Using the GHC heap profiler

Evan Laforge qdunkan at
Mon Mar 21 05:37:44 CET 2011

On Mon, Mar 21, 2011 at 9:59 AM, Tim Docker <twd2 at> wrote:
> My question on the ghc heap profiler on stack overflow:
> remains unanswered :-( Perhaps that's not the best forum. Is there someone
> here prepared to explain how the memory usage in the heap profiler relates
> to the  "Live Bytes" count shown in the garbage collection statistics?

I've long had the same questions and still don't know the answers, so
I'm curious too.  My guess was that the heap graph has the profiling
overhead subtracted out, but I don't know really.  The numbers don't
line up with +RTS -s output, but they seem to go up and down by the
same amount.

Also, the time axis clearly isn't wall time.  I'm guessing CPU time,
but once again, it doesn't line up with getCPUTime output.  It's
actually kind of annoying because to get a steady state picture of
heap usage the only thing I could think of was to write a several
second busy loop and look for the flat spot.

More information about the Glasgow-haskell-users mailing list