1 <Chapter id="profiling">
6 <IndexTerm><Primary>profiling, with cost-centres</Primary></IndexTerm>
7 <IndexTerm><Primary>cost-centre profiling</Primary></IndexTerm>
8 Glasgow Haskell comes with a time and space profiling system. Its
9 purpose is to help you improve your understanding of your program's
10 execution behaviour, so you can improve it.
14 Any comments, suggestions and/or improvements you have are welcome.
15 Recommended “profiling tricks” would be especially cool!
18 <Sect1 id="profiling-intro">
19 <Title>How to profile a Haskell program
23 The GHC approach to profiling is very simple: annotate the expressions
24 you consider “interesting” with <Emphasis>cost centre</Emphasis> labels (strings);
25 so, for example, you might have:
33 output1 = _scc_ "Pass1" ( pass1 x )
34 output2 = _scc_ "Pass2" ( pass2 output1 y )
35 output3 = _scc_ "Pass3" ( pass3 (output2 `zip` [1 .. ]) )
42 The costs of the evaluating the expressions bound to <VarName>output1</VarName>,
43 <VarName>output2</VarName> and <VarName>output3</VarName> will be attributed to the “cost
44 centres” <VarName>Pass1</VarName>, <VarName>Pass2</VarName> and <VarName>Pass3</VarName>, respectively.
48 The costs of evaluating other expressions, e.g., <Literal>concat output4</Literal>,
49 will be inherited by the scope which referenced the function <Function>f</Function>.
53 You can put in cost-centres via <Function>_scc_</Function> constructs by hand, as in the
54 example above. Perfectly cool. That's probably what you
55 <Emphasis>would</Emphasis> do if your program divided into obvious “passes” or
56 “phases”, or whatever.
60 If your program is large or you have no clue what might be gobbling
61 all the time, you can get GHC to mark all functions with <Function>_scc_</Function>
62 constructs, automagically. Add an <Option>-auto</Option> compilation flag to the
63 usual <Option>-prof</Option> option.
67 Once you start homing in on the Guilty Suspects, you may well switch
68 from automagically-inserted cost-centres to a few well-chosen ones of
73 To use profiling, you must <Emphasis>compile</Emphasis> and <Emphasis>run</Emphasis> with special
74 options. (We usually forget the “run” magic!—Do as we say, not as
75 we do…) Details follow.
79 If you're serious about this profiling game, you should probably read
80 one or more of the Sansom/Peyton Jones papers about the GHC profiling
81 system. Just visit the <ULink URL="http://www.dcs.gla.ac.uk/fp/">Glasgow FP group web page</ULink>…
86 <Sect1 id="prof-compiler-options">
87 <Title>Compiling programs for profiling
91 <IndexTerm><Primary>profiling options</Primary></IndexTerm>
92 <IndexTerm><Primary>options, for profiling</Primary></IndexTerm>
96 To make use of the cost centre profiling system <Emphasis>all</Emphasis> modules must
97 be compiled and linked with the <Option>-prof</Option> option.<IndexTerm><Primary>-prof option</Primary></IndexTerm>
98 Any <Function>_scc_</Function> constructs you've put in your source will spring to life.
102 Without a <Option>-prof</Option> option, your <Function>_scc_</Function>s are ignored; so you can
103 compiled <Function>_scc_</Function>-laden code without changing it.
107 There are a few other profiling-related compilation options. Use them
108 <Emphasis>in addition to</Emphasis> <Option>-prof</Option>. These do not have to be used
109 consistently for all modules in a program.
116 <Term><Option>-auto</Option>:</Term>
119 <IndexTerm><Primary>-auto option</Primary></IndexTerm>
120 <IndexTerm><Primary>cost centres, automatically inserting</Primary></IndexTerm>
121 GHC will automatically add <Function>_scc_</Function> constructs for
122 all top-level, exported functions.
127 <Term><Option>-auto-all</Option>:</Term>
130 <IndexTerm><Primary>-auto-all option</Primary></IndexTerm>
131 <Emphasis>All</Emphasis> top-level functions, exported or not, will be automatically
132 <Function>_scc_</Function>'d.
137 <Term><Option>-caf-all</Option>:</Term>
140 <IndexTerm><Primary>-caf-all option</Primary></IndexTerm>
141 The costs of all CAFs in a module are usually attributed to one
142 “big” CAF cost-centre. With this option, all CAFs get their own cost-centre.
143 An “if all else fails” option…
148 <Term><Option>-ignore-scc</Option>:</Term>
151 <IndexTerm><Primary>-ignore-scc option</Primary></IndexTerm>
152 Ignore any <Function>_scc_</Function> constructs,
153 so a module which already has <Function>_scc_</Function>s can be
154 compiled for profiling with the annotations ignored.
159 <Term><Option>-G<group></Option>:</Term>
162 <IndexTerm><Primary>-G<group> option</Primary></IndexTerm>
163 Specifies the <Literal><group></Literal> to be attached to all the cost-centres
164 declared in the module. If no group is specified it defaults to the
173 In addition to the <Option>-prof</Option> option your system might be setup to enable
174 you to compile and link with the <Option>-prof-details</Option> <IndexTerm><Primary>-prof-details
175 option</Primary></IndexTerm> option instead. This enables additional detailed counts
176 to be reported with the <Option>-P</Option> RTS option.
181 <Sect1 id="prof-rts-options">
182 <Title>How to control your profiled program at runtime
186 <IndexTerm><Primary>profiling RTS options</Primary></IndexTerm>
187 <IndexTerm><Primary>RTS options, for profiling</Primary></IndexTerm>
191 It isn't enough to compile your program for profiling with <Option>-prof</Option>!
195 When you <Emphasis>run</Emphasis> your profiled program, you must tell the runtime
196 system (RTS) what you want to profile (e.g., time and/or space), and
197 how you wish the collected data to be reported. You also may wish to
198 set the sampling interval used in time profiling.
202 Executive summary: <Command>./a.out +RTS -pT</Command> produces a time profile in
203 <Filename>a.out.prof</Filename>; <Command>./a.out +RTS -hC</Command> produces space-profiling
204 info which can be mangled by <Command>hp2ps</Command> and viewed with <Command>ghostview</Command>
209 Profiling runtime flags are passed to your program between the usual
210 <Option>+RTS</Option> and <Option>-RTS</Option> options.
217 <Term><Option>-p<sort></Option> or <Option>-P<sort></Option>:</Term>
220 <IndexTerm><Primary>-p<sort> RTS option (profiling)</Primary></IndexTerm>
221 <IndexTerm><Primary>-P<sort> RTS option (profiling)</Primary></IndexTerm>
222 <IndexTerm><Primary>time profile</Primary></IndexTerm>
223 <IndexTerm><Primary>serial time profile</Primary></IndexTerm>
224 The <Option>-p?</Option> option produces a standard <Emphasis>time profile</Emphasis> report.
225 It is written into the file <Filename><program>@.prof</Filename>.
229 The <Option>-P?</Option> option produces a more detailed report containing the
230 actual time and allocation data as well. (Not used much.)
234 The <Literal><sort></Literal> indicates how the cost centres are to be sorted in the
235 report. Valid <Literal><sort></Literal> options are:
239 <Term><Option>T</Option>:</Term>
242 by time, largest first (the default);
247 <Term><Option>A</Option>:</Term>
250 by bytes allocated, largest first;
255 <Term><Option>C</Option>:</Term>
258 alphabetically by group, module and cost centre.
267 <Term><Option>-i<secs></Option>:</Term>
270 <IndexTerm><Primary>-i<secs> RTS option
271 (profiling)</Primary></IndexTerm> Set the profiling (sampling) interval to <Literal><secs></Literal>
272 seconds (the default is 1 second). Fractions are allowed: for example
273 <Option>-i0.2</Option> will get 5 samples per second.
278 <Term><Option>-h<break-down></Option>:</Term>
281 <IndexTerm><Primary>-h<break-down> RTS option (profiling)</Primary></IndexTerm>
282 <IndexTerm><Primary>heap profile</Primary></IndexTerm>
286 Produce a detailed <Emphasis>space profile</Emphasis> of the heap occupied by live
287 closures. The profile is written to the file <Filename><program>@.hp</Filename> from
288 which a PostScript graph can be produced using <Command>hp2ps</Command> (see
289 <XRef LinkEnd="hp2ps">).
293 The heap space profile may be broken down by different criteria:
297 <Term><Option>-hC</Option>:</Term>
300 cost centre which produced the closure (the default).
305 <Term><Option>-hM</Option>:</Term>
308 cost centre module which produced the closure.
313 <Term><Option>-hG</Option>:</Term>
316 cost centre group which produced the closure.
321 <Term><Option>-hD</Option>:</Term>
324 closure description—a string describing the closure.
329 <Term><Option>-hY</Option>:</Term>
332 closure type—a string describing the closure's type.
337 By default all live closures in the heap are profiled, but particular
338 closures of interest can be selected (see below).
346 Heap (space) profiling uses hash tables. If these tables
347 should fill the run will abort. The
348 <Option>-z<tbl><size></Option><IndexTerm><Primary>-z<tbl><size> RTS option (profiling)</Primary></IndexTerm> option is used to
349 increase the size of the relevant hash table (<Literal>C</Literal>, <Literal>M</Literal>,
350 <Literal>G</Literal>, <Literal>D</Literal> or <Literal>Y</Literal>, defined as for <Literal><break-down></Literal> above). The
351 actual size used is the next largest power of 2.
355 The heap profile can be restricted to particular closures of interest.
356 The closures of interest can selected by the attached cost centre
357 (module:label, module and group), closure category (description, type,
358 and kind) using the following options:
365 <Term><Option>-c{<mod>:<lab>,<mod>:<lab>...</Option>}:</Term>
368 <IndexTerm><Primary>-c{<lab></Primary></IndexTerm> RTS option (profiling)}
369 Selects individual cost centre(s).
374 <Term><Option>-m{<mod>,<mod>...</Option>}:</Term>
377 <IndexTerm><Primary>-m{<mod></Primary></IndexTerm> RTS option (profiling)}
378 Selects all cost centres from the module(s) specified.
383 <Term><Option>-g{<grp>,<grp>...</Option>}:</Term>
386 <IndexTerm><Primary>-g{<grp></Primary></IndexTerm> RTS option (profiling)}
387 Selects all cost centres from the groups(s) specified.
392 <Term><Option>-d{<des>,<des>...</Option>}:</Term>
395 <IndexTerm><Primary>-d{<des></Primary></IndexTerm> RTS option (profiling)}
396 Selects closures which have one of the specified descriptions.
401 <Term><Option>-y{<typ>,<typ>...</Option>}:</Term>
404 <IndexTerm><Primary>-y{<typ></Primary></IndexTerm> RTS option (profiling)}
405 Selects closures which have one of the specified type descriptions.
410 <Term><Option>-k{<knd>,<knd>...</Option>}:</Term>
413 <IndexTerm><Primary>-k{<knd></Primary></IndexTerm> RTS option (profiling)}
414 Selects closures which are of one of the specified closure kinds.
415 Valid closure kinds are <Literal>CON</Literal> (constructor), <Literal>FN</Literal> (manifest
416 function), <Literal>PAP</Literal> (partial application), <Literal>BH</Literal> (black hole) and
417 <Literal>THK</Literal> (thunk).
425 The space occupied by a closure will be reported in the heap profile
426 if the closure satisfies the following logical expression:
430 <Quote>([-c] or [-m] or [-g]) and ([-d] or [-y] or [-k])</Quote>
434 where a particular option is true if the closure (or its attached cost
435 centre) is selected by the option (or the option is not specified).
440 <Sect1 id="prof-output">
441 <Title>What's in a profiling report?
445 <IndexTerm><Primary>profiling report, meaning thereof</Primary></IndexTerm>
449 When you run your profiled program with the <Option>-p</Option> RTS option <IndexTerm><Primary>-p
450 RTS option</Primary></IndexTerm>, you get the following information about your “cost
458 <Term><Literal>COST CENTRE</Literal>:</Term>
461 The cost-centre's name.
466 <Term><Literal>MODULE</Literal>:</Term>
469 The module associated with the cost-centre;
470 important mostly if you have identically-named cost-centres in
476 <Term><Literal>scc</Literal>:</Term>
479 How many times this cost-centre was entered; think
480 of it as “I got to the <Function>_scc_</Function> construct this many times…”
485 <Term><Literal>%time</Literal>:</Term>
488 What part of the time was spent in this cost-centre (see also “ticks,”
494 <Term><Literal>%alloc</Literal>:</Term>
497 What part of the memory allocation was done in this cost-centre
498 (see also “bytes,” below).
503 <Term><Literal>inner</Literal>:</Term>
506 How many times this cost-centre “passed control” to an inner
507 cost-centre; for example, <Literal>scc=4</Literal> plus <Literal>subscc=8</Literal> means
508 “This <Literal>_scc_</Literal> was entered four times, but went out to
509 other <Literal>_scc_s</Literal> eight times.”
514 <Term><Literal>cafs</Literal>:</Term>
517 <IndexTerm><Primary>CAF, profiling</Primary></IndexTerm>
518 How many CAFs this cost centre evaluated.
523 <Term><Literal>dicts</Literal>:</Term>
526 <IndexTerm><Primary>Dictionaries, profiling</Primary></IndexTerm>
527 How many dictionaries this cost centre evaluated.
535 In addition you can use the <Option>-P</Option> RTS option <IndexTerm><Primary></Primary></IndexTerm> to get the following additional information:
539 <Term><Literal>ticks</Literal>:</Term>
542 The raw number of time “ticks” which were
543 attributed to this cost-centre; from this, we get the <Literal>%time</Literal>
544 figure mentioned above.
549 <Term><Literal>bytes</Literal>:</Term>
552 Number of bytes allocated in the heap while in
553 this cost-centre; again, this is the raw number from which we
554 get the <Literal>%alloc</Literal> figure mentioned above.
562 Finally if you built your program with <Option>-prof-details</Option>
563 <IndexTerm><Primary></Primary></IndexTerm> the <Option>-P</Option> RTS option will also
564 produce the following information:
568 <Term><Literal>closures</Literal>:</Term>
571 <IndexTerm><Primary>closures, profiling</Primary></IndexTerm>
572 How many heap objects were allocated; these objects may be of varying
573 size. If you divide the number of bytes (mentioned below) by this
574 number of “closures”, then you will get the average object size.
575 (Not too interesting, but still…)
580 <Term><Literal>thunks</Literal>:</Term>
583 <IndexTerm><Primary>thunks, profiling</Primary></IndexTerm>
584 How many times we entered (evaluated) a thunk—an unevaluated
585 object in the heap—while we were in this cost-centre.
590 <Term><Literal>funcs</Literal>:</Term>
593 <IndexTerm><Primary>functions, profiling</Primary></IndexTerm>
594 How many times we entered (evaluated) a function while we we in this
595 cost-centre. (In Haskell, functions are first-class values and may be
596 passed as arguments, returned as results, evaluated, and generally
597 manipulated just like data values)
602 <Term><Literal>PAPs</Literal>:</Term>
605 <IndexTerm><Primary>partial applications, profiling</Primary></IndexTerm>
606 How many times we entered (evaluated) a partial application (PAP), i.e.,
607 a function applied to fewer arguments than it needs. For example, <Literal>Int</Literal>
608 addition applied to one argument would be a PAP. A PAP is really
609 just a particular form for a function.
618 <Sect1 id="prof-graphs">
619 <Title>Producing graphical heap profiles
623 <IndexTerm><Primary>heap profiles, producing</Primary></IndexTerm>
627 Utility programs which produce graphical profiles.
631 <Title><Command>hp2ps</Command>--heap profile to PostScript
635 <IndexTerm><Primary>hp2ps (utility)</Primary></IndexTerm>
636 <IndexTerm><Primary>heap profiles</Primary></IndexTerm>
637 <IndexTerm><Primary>PostScript, from heap profiles</Primary></IndexTerm>
647 hp2ps [flags] [<file>[.stat]]
653 The program <Command>hp2ps</Command><IndexTerm><Primary>hp2ps program</Primary></IndexTerm> converts a heap profile
654 as produced by the <Option>-h<break-down></Option><IndexTerm><Primary>-h<break-down> RTS
655 option</Primary></IndexTerm> runtime option into a PostScript graph of the heap
656 profile. By convention, the file to be processed by <Command>hp2ps</Command> has a
657 <Filename>.hp</Filename> extension. The PostScript output is written to <Filename><file>@.ps</Filename>. If
658 <Filename><file></Filename> is omitted entirely, then the program behaves as a filter.
662 <Command>hp2ps</Command> is distributed in <Filename>ghc/utils/hp2ps</Filename> in a GHC source
663 distribution. It was originally developed by Dave Wakeling as part of
664 the HBC/LML heap profiler.
672 <Term><Option>-d</Option></Term>
675 In order to make graphs more readable, <Command>hp2ps</Command> sorts the shaded
676 bands for each identifier. The default sort ordering is for the bands
677 with the largest area to be stacked on top of the smaller ones. The
678 <Option>-d</Option> option causes rougher bands (those representing series of
679 values with the largest standard deviations) to be stacked on top of
685 <Term><Option>-b</Option></Term>
688 Normally, <Command>hp2ps</Command> puts the title of the graph in a small box at the
689 top of the page. However, if the JOB string is too long to fit in a
690 small box (more than 35 characters), then
691 <Command>hp2ps</Command> will choose to use a big box instead. The <Option>-b</Option>
692 option forces <Command>hp2ps</Command> to use a big box.
697 <Term><Option>-e<float>[in|mm|pt]</Option></Term>
700 Generate encapsulated PostScript suitable for inclusion in LaTeX
701 documents. Usually, the PostScript graph is drawn in landscape mode
702 in an area 9 inches wide by 6 inches high, and <Command>hp2ps</Command> arranges
703 for this area to be approximately centred on a sheet of a4 paper.
704 This format is convenient of studying the graph in detail, but it is
705 unsuitable for inclusion in LaTeX documents. The <Option>-e</Option> option
706 causes the graph to be drawn in portrait mode, with float specifying
707 the width in inches, millimetres or points (the default). The
708 resulting PostScript file conforms to the Encapsulated PostScript
709 (EPS) convention, and it can be included in a LaTeX document using
710 Rokicki's dvi-to-PostScript converter <Command>dvips</Command>.
715 <Term><Option>-g</Option></Term>
718 Create output suitable for the <Command>gs</Command> PostScript previewer (or
719 similar). In this case the graph is printed in portrait mode without
720 scaling. The output is unsuitable for a laser printer.
725 <Term><Option>-l</Option></Term>
728 Normally a profile is limited to 20 bands with additional identifiers
729 being grouped into an <Literal>OTHER</Literal> band. The <Option>-l</Option> flag removes this
730 20 band and limit, producing as many bands as necessary. No key is
731 produced as it won't fit!. It is useful for creation time profiles
737 <Term><Option>-m<int></Option></Term>
740 Normally a profile is limited to 20 bands with additional identifiers
741 being grouped into an <Literal>OTHER</Literal> band. The <Option>-m</Option> flag specifies an
742 alternative band limit (the maximum is 20).
746 <Option>-m0</Option> requests the band limit to be removed. As many bands as
747 necessary are produced. However no key is produced as it won't fit! It
748 is useful for displaying creation time profiles with many bands.
753 <Term><Option>-p</Option></Term>
756 Use previous parameters. By default, the PostScript graph is
757 automatically scaled both horizontally and vertically so that it fills
758 the page. However, when preparing a series of graphs for use in a
759 presentation, it is often useful to draw a new graph using the same
760 scale, shading and ordering as a previous one. The <Option>-p</Option> flag causes
761 the graph to be drawn using the parameters determined by a previous
762 run of <Command>hp2ps</Command> on <Filename>file</Filename>. These are extracted from
763 <Filename>file@.aux</Filename>.
768 <Term><Option>-s</Option></Term>
771 Use a small box for the title.
776 <Term><Option>-t<float></Option></Term>
779 Normally trace elements which sum to a total of less than 1% of the
780 profile are removed from the profile. The <Option>-t</Option> option allows this
781 percentage to be modified (maximum 5%).
785 <Option>-t0</Option> requests no trace elements to be removed from the profile,
786 ensuring that all the data will be displayed.
791 <Term><Option>-?</Option></Term>
794 Print out usage information.
803 <Sect2 id="stat2resid">
804 <Title><Command>stat2resid</Command>—residency info from GC stats
808 <IndexTerm><Primary>stat2resid (utility)</Primary></IndexTerm>
809 <IndexTerm><Primary>GC stats—residency info</Primary></IndexTerm>
810 <IndexTerm><Primary>residency, from GC stats</Primary></IndexTerm>
820 stat2resid [<file>[.stat] [<outfile>]]
826 The program <Command>stat2resid</Command><IndexTerm><Primary>stat2resid</Primary></IndexTerm> converts a detailed
827 garbage collection statistics file produced by the
828 <Option>-S</Option><IndexTerm><Primary>-S RTS option</Primary></IndexTerm> runtime option into a PostScript heap
829 residency graph. The garbage collection statistics file can be
830 produced without compiling your program for profiling.
834 By convention, the file to be processed by <Command>stat2resid</Command> has a
835 <Filename>.stat</Filename> extension. If the <Filename><outfile></Filename> is not specified the
836 PostScript will be written to <Filename><file>@.resid.ps</Filename>. If
837 <Filename><file></Filename> is omitted entirely, then the program behaves as a filter.
841 The plot can not be produced from the statistics file for a
842 generational collector, though a suitable stats file can be produced
843 using the <Option>-G1</Option><IndexTerm><Primary>-G RTS
844 option</Primary></IndexTerm> runtime option when the program has been
845 compiled for generational garbage collection (the default).
849 <Command>stat2resid</Command> is distributed in <Filename>ghc/utils/stat2resid</Filename> in a GHC source
857 <Sect1 id="ticky-ticky">
858 <Title>Using “ticky-ticky” profiling (for implementors)
862 <IndexTerm><Primary>ticky-ticky profiling (implementors)</Primary></IndexTerm>
866 (ToDo: document properly.)
870 It is possible to compile Glasgow Haskell programs so that they will
871 count lots and lots of interesting things, e.g., number of updates,
872 number of data constructors entered, etc., etc. We call this
873 “ticky-ticky” profiling,<IndexTerm><Primary>ticky-ticky profiling</Primary></IndexTerm>
874 <IndexTerm><Primary>profiling, ticky-ticky</Primary></IndexTerm> because that's the sound a Sun4 makes
875 when it is running up all those counters (<Emphasis>slowly</Emphasis>).
879 Ticky-ticky profiling is mainly intended for implementors; it is quite
880 separate from the main “cost-centre” profiling system, intended for
881 all users everywhere.
885 To be able to use ticky-ticky profiling, you will need to have built
886 appropriate libraries and things when you made the system. See
887 “Customising what libraries to build,” in the installation guide.
891 To get your compiled program to spit out the ticky-ticky numbers, use
892 a <Option>-r</Option> RTS option<IndexTerm><Primary>-r RTS option</Primary></IndexTerm>. See <XRef LinkEnd="runtime-control">.
896 Compiling your program with the <Option>-ticky</Option> switch yields an executable
897 that performs these counts. Here is a sample ticky-ticky statistics
898 file, generated by the invocation <Command>foo +RTS -rfoo.ticky</Command>.
907 ALLOCATIONS: 3964631 (11330900 words total: 3999476 admin, 6098829 goods, 1232595 slop)
908 total words: 2 3 4 5 6+
909 69647 ( 1.8%) function values 50.0 50.0 0.0 0.0 0.0
910 2382937 ( 60.1%) thunks 0.0 83.9 16.1 0.0 0.0
911 1477218 ( 37.3%) data values 66.8 33.2 0.0 0.0 0.0
913 2 ( 0.0%) black holes 0.0 100.0 0.0 0.0 0.0
914 0 ( 0.0%) prim things
915 34825 ( 0.9%) partial applications 0.0 0.0 0.0 100.0 0.0
916 2 ( 0.0%) thread state objects 0.0 0.0 0.0 0.0 100.0
918 Total storage-manager allocations: 3647137 (11882004 words)
919 [551104 words lost to speculative heap-checks]
923 ENTERS: 9400092 of which 2005772 (21.3%) direct to the entry code
924 [the rest indirected via Node's info ptr]
925 1860318 ( 19.8%) thunks
926 3733184 ( 39.7%) data values
927 3149544 ( 33.5%) function values
928 [of which 1999880 (63.5%) bypassed arg-satisfaction chk]
929 348140 ( 3.7%) partial applications
930 308906 ( 3.3%) normal indirections
931 0 ( 0.0%) permanent indirections
934 2137257 ( 36.4%) from entering a new constructor
935 [the rest from entering an existing constructor]
936 2349219 ( 40.0%) vectored [the rest unvectored]
938 RET_NEW: 2137257: 32.5% 46.2% 21.3% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
939 RET_OLD: 3733184: 2.8% 67.9% 29.3% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
940 RET_UNBOXED_TUP: 2: 0.0% 0.0%100.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
942 RET_VEC_RETURN : 2349219: 0.0% 0.0%100.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
944 UPDATE FRAMES: 2241725 (0 omitted from thunks)
948 0 ( 0.0%) data values
949 34827 ( 1.6%) partial applications
950 [2 in place, 34825 allocated new space]
951 2206898 ( 98.4%) updates to existing heap objects (46 by squeezing)
952 UPD_CON_IN_NEW: 0: 0 0 0 0 0 0 0 0 0
953 UPD_PAP_IN_NEW: 34825: 0 0 0 34825 0 0 0 0 0
955 NEW GEN UPDATES: 2274700 ( 99.9%)
957 OLD GEN UPDATES: 1852 ( 0.1%)
959 Total bytes copied during GC: 190096
961 **************************************************
962 3647137 ALLOC_HEAP_ctr
963 11882004 ALLOC_HEAP_tot
968 34831 ALLOC_FUN_hst_0
969 34816 ALLOC_FUN_hst_1
973 2382937 ALLOC_UP_THK_ctr
976 0 E!NT_PERM_IND_ctr requires +RTS -Z
977 [... lots more info omitted ...]
978 0 GC_SEL_ABANDONED_ctr
981 0 GC_FAILED_PROMOTION_ctr
982 47524 GC_WORDS_COPIED_ctr
988 The formatting of the information above the row of asterisks is
989 subject to change, but hopefully provides a useful human-readable
990 summary. Below the asterisks <Emphasis>all counters</Emphasis> maintained by the
991 ticky-ticky system are dumped, in a format intended to be
992 machine-readable: zero or more spaces, an integer, a space, the
993 counter name, and a newline.
997 In fact, not <Emphasis>all</Emphasis> counters are necessarily dumped; compile- or
998 run-time flags can render certain counters invalid. In this case,
999 either the counter will simply not appear, or it will appear with a
1000 modified counter name, possibly along with an explanation for the
1001 omission (notice <Literal>ENT_PERM_IND_ctr</Literal> appears with an inserted <Literal>!</Literal>
1002 above). Software analysing this output should always check that it
1003 has the counters it expects. Also, beware: some of the counters can
1004 have <Emphasis>large</Emphasis> values!