1 To: partain@dcs.gla.ac.uk
2 cc: areid@dcs.gla.ac.uk, andy@dcs.gla.ac.uk
3 Subject: Heap profiling programs
4 Date: Thu, 09 Dec 93 17:33:09 +0000
5 From: Alastair Reid <areid@dcs.gla.ac.uk>
8 I've hacked up a couple of programs which it might be worth putting in
9 the next ghc distribution. They are:
13 Draws a continuous graph of any one column of the statistics
14 produced using the "+RTS -Sstderr" option.
16 I'm not convinced this is astonishingly useful since I'm yet to
17 learn anything useful from (manually) examining these statistics.
18 (Although I do vaguely remember asking Patrick if the heap profiler
19 could do stack profiles too.)
23 slife 2 Unis/gardenofeden +RTS -Sstderr -H1M -RTS |& graph 2
25 which draws a graph of the third column (ie column 2!) of the
28 (btw is there a neater way of connecting stderr to graph's stdin?)
32 Draws a continuous graph of the statistics reported by the "+RTS -h"
35 Since I understand what the figures mean, this seems to be the more
41 hpView2 slife.hp Main:mkQuad &
42 slife 2 Unis/gardenofeden +RTS -h -i0.1 -RTS
45 which draws a graph of the total heap usage and the usage for Main:mkQuad.
50 The code is a gross hack... but it works. (Maybe distribute in rot13
51 format so that you don't get accidentally get exposed to obscene code
54 The code uses a variant of Andy's picoXlibrary (which he was talking
55 about releasing but maybe isn't ready to do yet.)
57 Also, there are lots of obvious extensions etc which could be made but
58 haven't yet... (The major one is being able to set the initial
59 scale-factor for displaying the graphs or being able to graph several
60 stats at once without having to tee.)
63 Hope you find them interesting.
67 ps Code is in ~areid/hask/Life and should be readable/executable.