4.4. What's in a profiling report?

When you run your profiled program with the -p RTS option , you get the following information about your ``cost centres'':

COST CENTRE:

The cost-centre's name.

MODULE:

The module associated with the cost-centre; important mostly if you have identically-named cost-centres in different modules.

scc:

How many times this cost-centre was entered; think of it as ``I got to the _scc_ construct this many times…''

%time:

What part of the time was spent in this cost-centre (see also ``ticks,'' below).

%alloc:

What part of the memory allocation was done in this cost-centre (see also ``bytes,'' below).

inner:

How many times this cost-centre ``passed control'' to an inner cost-centre; for example, scc=4 plus subscc=8 means ``This _scc_ was entered four times, but went out to other _scc_s eight times.''

cafs:

How many CAFs this cost centre evaluated.

dicts:

How many dictionaries this cost centre evaluated.

In addition you can use the -P RTS option to get the following additional information:

ticks:

The raw number of time ``ticks'' which were attributed to this cost-centre; from this, we get the %time figure mentioned above.

bytes:

Number of bytes allocated in the heap while in this cost-centre; again, this is the raw number from which we get the %alloc figure mentioned above.

Finally if you built your program with -prof-details the -P RTS option will also produce the following information:

closures:

How many heap objects were allocated; these objects may be of varying size. If you divide the number of bytes (mentioned below) by this number of ``closures'', then you will get the average object size. (Not too interesting, but still…)

thunks:

How many times we entered (evaluated) a thunk—an unevaluated object in the heap—while we were in this cost-centre.

funcs:

How many times we entered (evaluated) a function while we we in this cost-centre. (In Haskell, functions are first-class values and may be passed as arguments, returned as results, evaluated, and generally manipulated just like data values)

PAPs:

How many times we entered (evaluated) a partial application (PAP), i.e., a function applied to fewer arguments than it needs. For example, Int addition applied to one argument would be a PAP. A PAP is really just a particular form for a function.