Preview of new profiling mode - profile by info table

Matthew Pickering matthewtpickering at
Sun May 3 11:57:27 UTC 2020

Hi all,

I have hacked together a new profiling mode code named "Profile by
Info Table" which
uses the address of the info table as the band identity in the profile.

The main point of this is that you can then look up the source
location of the info table in the dwarf information when rendering the

For example, in this profile I have only included THUNK closures,
which you can reliably look up in the dwarf information. You can't
include things like constructor closures for example as every
constructor has the same info table regardless of where it comes from
in the source.

In the profiles below if you click on the Closure Descs tab you can
see the precise source position the band originated from.

As a test, I compiled the Cabal library with -O2 and here is the
result. Firstly a profile sorted by size of the bands.

I also added a mode to eventlog2html which calculates the gradient of
the line so you can more easily spot things which are leaking but not
very big themselves which might be retaining other closures.

We can see clearly here that there are calls to compute unfoldings
which remain unevaluated for a long time and therefore retaining
reference to core expressions. (See the 0x177ff78 closure for

The only issue is that at the moment reading the DWARF information
takes about 48gb of memory.



More information about the ghc-devs mailing list