[project @ 1996-01-11 14:06:51 by partain]
[ghc-hetmet.git] / ghc / docs / users_guide / prof-output.lit
1 %
2 % Included by profiling.lit
3 %
4
5 When you run your profiled program with the \tr{-p} RTS option
6 \index{\tr{-p<sort> RTS option (profiling)}, you get the following
7 information about your ``cost centres'':
8
9 \begin{description}
10 %-------------------------------------------------------------
11 \item[\tr{COST CENTRE}:] The cost-centre's name.
12 %-------------------------------------------------------------
13 \item[\tr{MODULE}:]
14 The module associated with the cost-centre;
15 important mostly if you have identically-named cost-centres in
16 different modules.
17 %-------------------------------------------------------------
18 \item[\tr{scc}:]
19 How many times this cost-centre was entered; think
20 of it as ``I got to the \tr{_scc_} construct this many times...''
21 %-------------------------------------------------------------
22 \item[\tr{subcc}:]
23 How many times this cost-centre ``passed control'' to another
24 cost-centre; for example, \tr{scc=4} plus \tr{subscc=8} means
25 ``This \tr{_scc_} was entered four times, but went out to
26 other \tr{_scc_s} eight times.''
27 %-------------------------------------------------------------
28 \item[\tr{%time}:]
29 What part of the time was spent in this cost-centre (see also ``ticks,''
30 below).
31 %-------------------------------------------------------------
32 \item[\tr{%alloc}:]
33 What part of the memory allocation was done in this cost-centre
34 (see also ``bytes,'' below).
35 \end{description}
36
37 If you use the \tr{-P} RTS option
38 \index{\tr{-P<sort> RTS option (profiling)}, you will also get the
39 following information:
40 \begin{description}
41 %-------------------------------------------------------------
42 \item[\tr{cafcc}:] Two columns, analogous to the \tr{scc} and \tr{subcc}
43 columns, except these are for CAF cost-centres: the first column
44 is how many times this top-level CAF cost-centre was entered;
45 the second column is how many times this cost-centre (CAF or otherwise)
46 entered another CAF cost-centre.
47 %-------------------------------------------------------------
48 \item[\tr{thunks}:]
49 How many times we entered (evaluated) a thunk---an unevaluated
50 object in the heap---while we were in this cost-centre.
51 %-------------------------------------------------------------
52 \item[\tr{funcs}:]
53 How many times we entered (evaluated) a function while we we in this
54 cost-centre.  (In Haskell, functions are first-class values and may be
55 passed as arguments, returned as results, evaluated, and generally
56 manipulated just like data values)
57 %-------------------------------------------------------------
58 \item[\tr{PAPs}:]
59 How many times we entered (evaluated) a partial application (PAP), i.e.,
60 a function applied to fewer arguments than it needs.  For example, \tr{Int}
61 addition applied to one argument would be a PAP.  A PAP is really
62 just a particular form for a function.
63 %-------------------------------------------------------------
64 \item[\tr{closures}:]
65 How many heap objects were allocated; these objects may be of varying
66 size.  If you divide the number of bytes (mentioned below) by this
67 number of ``closures'', then you will get the average object size.
68 (Not too interesting, but still...)
69 %-------------------------------------------------------------
70 \item[\tr{ticks}:]  The raw number of time ``ticks'' which were
71 attributed to this cost-centre; from this, we get the \tr{%time}
72 figure mentioned above.
73 %-------------------------------------------------------------
74 \item[\tr{bytes}:] Number of bytes allocated in the heap while in
75 this cost-centre; again, this is the raw number from which we
76 get the \tr{%alloc} figure mentioned above.
77 \end{description}