profiling usage

Serge D. Mechveliani mechvel at botik.ru
Wed Jan 26 04:13:26 EST 2005


Dear GHC experts,

I have another question about the profiling usage in ghc-6.2.2.

I thank "Simon Marlow" <simonmar at microsoft.com> for the explanations.
We wrote

>> There was set a single point of {-# SCC "isReducibleAtTop" #-}.
>> Why the report prints the two different lines for it?

> You removed the indentation, which was there to indicate the call
> nesting.  A cost centre that appears more than once indicates that it
> was called in two places in your program (or called with two different
> lexical call stacks, to be precise).

The indentation in the profiling report or in the source program?
The report prints some function names not from the beginning of the 
line ...
Maybe, you can give a simple example of a program with SCC when the 
center is printed twice? For I do not understand this point.

Now I replaced SCC with  -auto-all,  and it gives a report which
looks satisfactory.
The first part 
               lpo           TermComp          29.9   47.0
               relates       Prelude1          13.1    1.5 
               ...
is helpful all right.
But I also need to know how many times there was called a certain 
function  f,  no matter from where it is called and whether it
occurs in the first part of the report. I search for `f' in 
the large second part of the report. And find the two (often many) 
lines (with different indentation):

      f   Module1  10   20  ...   
      ...
        f   Module1  121  30  ...   

So, `f' was entered 20 times from one point and 30 times from another,
and 50 times in total. Right?

Thank you in advance for the explanation.

-----------------
Serge Mechveliani
mechvel at botik.ru









More information about the Glasgow-haskell-users mailing list