[project @ 1996-07-25 20:43:49 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{%time}:]
23 What part of the time was spent in this cost-centre (see also ``ticks,''
24 below).
25 %-------------------------------------------------------------
26 \item[\tr{%alloc}:]
27 What part of the memory allocation was done in this cost-centre
28 (see also ``bytes,'' below).
29 %-------------------------------------------------------------
30 \item[\tr{inner}:]
31 How many times this cost-centre ``passed control'' to an inner
32 cost-centre; for example, \tr{scc=4} plus \tr{subscc=8} means
33 ``This \tr{_scc_} was entered four times, but went out to
34 other \tr{_scc_s} eight times.''
35 %-------------------------------------------------------------
36 \item[\tr{cafs}:]
37 How many CAFs this cost centre evaluated.
38 %-------------------------------------------------------------
39 \item[\tr{dicts}:]
40 How many dictionaries this cost centre evaluated.
41 \end{description}
42
43 In addition you can use the \tr{-P} RTS option \index{\tr{-P<sort> RTS
44     option (profiling)}} to get the following additional information: 
45 \begin{description}
46 %-------------------------------------------------------------
47 \item[\tr{ticks}:]  The raw number of time ``ticks'' which were
48 attributed to this cost-centre; from this, we get the \tr{%time}
49 figure mentioned above.
50 %-------------------------------------------------------------
51 \item[\tr{bytes}:] Number of bytes allocated in the heap while in
52 this cost-centre; again, this is the raw number from which we
53 get the \tr{%alloc} figure mentioned above.
54 \end{description}
55
56 Finally if you built your program with \tr{-prof-details}
57 \index{\tr{-prof-details option}} the \tr{-P} RTS option will also
58 produce the following information:
59 \begin{description}
60 %-------------------------------------------------------------
61 \item[\tr{closures}:]
62 How many heap objects were allocated; these objects may be of varying
63 size.  If you divide the number of bytes (mentioned below) by this
64 number of ``closures'', then you will get the average object size.
65 (Not too interesting, but still...)
66 %-------------------------------------------------------------
67 \item[\tr{thunks}:]
68 How many times we entered (evaluated) a thunk---an unevaluated
69 object in the heap---while we were in this cost-centre.
70 %-------------------------------------------------------------
71 \item[\tr{funcs}:]
72 How many times we entered (evaluated) a function while we we in this
73 cost-centre.  (In Haskell, functions are first-class values and may be
74 passed as arguments, returned as results, evaluated, and generally
75 manipulated just like data values)
76 %-------------------------------------------------------------
77 \item[\tr{PAPs}:]
78 How many times we entered (evaluated) a partial application (PAP), i.e.,
79 a function applied to fewer arguments than it needs.  For example, \tr{Int}
80 addition applied to one argument would be a PAP.  A PAP is really
81 just a particular form for a function.
82 \end{description}