fix haddock submodule pointer
[ghc-hetmet.git] / utils / heap-view / MAIL
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>
6
7
8 I've hacked up a couple of programs which it might be worth putting in
9 the next ghc distribution.  They are:
10
11 graph:  
12
13   Draws a continuous graph of any one column of the statistics
14   produced using the "+RTS -Sstderr" option.
15
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.)
20
21   A typical usage is:
22
23     slife 2 Unis/gardenofeden +RTS -Sstderr -H1M -RTS |& graph 2
24
25   which draws a graph of the third column (ie column 2!) of the
26   stats.
27
28   (btw is there a neater way of connecting stderr to graph's stdin?)
29
30 hpView2:        
31
32   Draws a continuous graph of the statistics reported by the "+RTS -h"
33   option.
34
35   Since I understand what the figures mean, this seems to be the more
36   useful program.
37
38   A typical usage is:
39
40     mkfifo slife.hp
41     hpView2 slife.hp Main:mkQuad &
42     slife 2 Unis/gardenofeden +RTS -h -i0.1 -RTS 
43     rm slife.hp
44
45   which draws a graph of the total heap usage and the usage for Main:mkQuad.
46
47
48 Minor problems:
49
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
52 :-))
53
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.)
56
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.)
61
62
63 Hope you find them interesting.
64
65 Alastair
66
67 ps Code is in ~areid/hask/Life and should be readable/executable.