Basic heap profile support without -prof
authorSimon Marlow <simonmar@microsoft.com>
Fri, 27 Apr 2007 12:01:13 +0000 (12:01 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Fri, 27 Apr 2007 12:01:13 +0000 (12:01 +0000)
commitcbeb99efd4a117de5b028341dc41bc8f50717383
tree718b3dab5c48e29f797210702cbc2dc4d2b732ea
parent47e0b5e52240f8794b117e0dbde4e21f41ffe9ec
Basic heap profile support without -prof

Now that constructor info tables contain the name of the constructor,
we can generate useful heap profiles without requiring the whole
program and libraries to be compiled with -prof.  So now, "+RTS -hT"
generates a heap profile for any program, dividing the profile by
constructor.  It wouldn't be hard to add support for grouping
constructors by module, or to restrict the profile to certain
constructors/modules/packages.

This means that for the first time we can get heap profiles for GHCi,
which was previously impossible because the byte-code
interpreter and linker don't work with -prof.
12 files changed:
includes/InfoTables.h
includes/RtsFlags.h
rts/Arena.c
rts/Makefile
rts/ProfHeap.c
rts/Profiling.h
rts/Proftimer.c
rts/RtsFlags.c
rts/RtsStartup.c
rts/RtsUtils.c
rts/Schedule.c
rts/Timer.c