Heap profiling

Simon Marlow simonmar@microsoft.com
Thu, 18 Apr 2002 13:43:29 +0100

> I really like the profiling options in GHC, but I wonder if there's
> any good way of improving heap profiling speed?  I've tried using -i
> to reduce the number of measurements, but it didn't seem to help a
> lot. =20
> I see an order of magnitude speed degradation with heap profiling,
> which is slightly annoying, since it is with large runs heap
> consumption starts to become troublesome :-)
> Any tricks I ought to know about?

Have you tried one of the recent snapshots?  Heap profiling was
overhauled significantly since the 5.02 branch, and one of the things I
did was to make the -i option work better.  Previously profiling was
forced to use the 2-space collector, but now it can use generational
collection and just force a major GC before it does a heap census.

If you're stuck with 5.02.x, you can try increasing the size of the
allocation area with (say) -A4m to increase the time between garbage