summaryrefslogtreecommitdiff
path: root/utils/heap-view/MAIL
blob: 966fcdcfc736f986ed668c68c4b5937703cb642f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
To: partain@dcs.gla.ac.uk
cc: areid@dcs.gla.ac.uk, andy@dcs.gla.ac.uk
Subject: Heap profiling programs
Date: Thu, 09 Dec 93 17:33:09 +0000
From: Alastair Reid <areid@dcs.gla.ac.uk>


I've hacked up a couple of programs which it might be worth putting in
the next ghc distribution.  They are:

graph:	

  Draws a continuous graph of any one column of the statistics
  produced using the "+RTS -Sstderr" option.

  I'm not convinced this is astonishingly useful since I'm yet to
  learn anything useful from (manually) examining these statistics.
  (Although I do vaguely remember asking Patrick if the heap profiler
  could do stack profiles too.)

  A typical usage is:

    slife 2 Unis/gardenofeden +RTS -Sstderr -H1M -RTS |& graph 2

  which draws a graph of the third column (ie column 2!) of the
  stats.

  (btw is there a neater way of connecting stderr to graph's stdin?)

hpView2:	

  Draws a continuous graph of the statistics reported by the "+RTS -h"
  option.

  Since I understand what the figures mean, this seems to be the more
  useful program.

  A typical usage is:

    mkfifo slife.hp
    hpView2 slife.hp Main:mkQuad &
    slife 2 Unis/gardenofeden +RTS -h -i0.1 -RTS 
    rm slife.hp

  which draws a graph of the total heap usage and the usage for Main:mkQuad.


Minor problems:

The code is a gross hack... but it works.  (Maybe distribute in rot13
format so that you don't get accidentally get exposed to obscene code
:-))

The code uses a variant of Andy's picoXlibrary (which he was talking
about releasing but maybe isn't ready to do yet.)

Also, there are lots of obvious extensions etc which could be made but
haven't yet...  (The major one is being able to set the initial
scale-factor for displaying the graphs or being able to graph several
stats at once without having to tee.)


Hope you find them interesting.

Alastair

ps Code is in ~areid/hask/Life and should be readable/executable.