[project @ 2001-11-22 14:25:11 by simonmar]
authorsimonmar <unknown>
Thu, 22 Nov 2001 14:25:13 +0000 (14:25 +0000)
committersimonmar <unknown>
Thu, 22 Nov 2001 14:25:13 +0000 (14:25 +0000)
commitdb61851c5472bf565cd1da900b33d6e033fd743d
tree661b08f223da69c594927b950e3a3cfe6575e581
parenta88cde3915095d33b283cbbf7fd83cd08558d609
[project @ 2001-11-22 14:25:11 by simonmar]
Retainer Profiling / Lag-drag-void profiling.

This is mostly work by Sungwoo Park, who spent a summer internship at
MSR Cambridge this year implementing these two types of heap profiling
in GHC.

Relative to Sungwoo's original work, I've made some improvements to
the code:

   - it's now possible to apply constraints to retainer and LDV profiles
     in the same way as we do for other types of heap profile (eg.
     +RTS -hc{foo,bar} -hR -RTS gives you a retainer profiling considering
     only closures with cost centres 'foo' and 'bar').

   - the heap-profile timer implementation is cleaned up.

   - heap profiling no longer has to be run in a two-space heap.

   - general cleanup of the code and application of the SDM C coding
     style guidelines.

Profiling will be a little slower and require more space than before,
mainly because closures have an extra header word to support either
retainer profiling or LDV profiling (you can't do both at the same
time).

We've used the new profiling tools on GHC itself, with moderate
success.  Fixes for some space leaks in GHC to follow...
39 files changed:
ghc/includes/ClosureMacros.h
ghc/includes/Closures.h
ghc/includes/Stg.h
ghc/includes/StgLdvProf.h [new file with mode: 0644]
ghc/includes/StgMacros.h
ghc/includes/StgProf.h
ghc/includes/StgRetainerProf.h [new file with mode: 0644]
ghc/includes/Updates.h
ghc/rts/Exception.hc
ghc/rts/GC.c
ghc/rts/HeapStackCheck.hc
ghc/rts/Itimer.c
ghc/rts/Itimer.h
ghc/rts/LdvProfile.c [new file with mode: 0644]
ghc/rts/LdvProfile.h [new file with mode: 0644]
ghc/rts/PrimOps.hc
ghc/rts/ProfHeap.c
ghc/rts/ProfHeap.h
ghc/rts/Profiling.c
ghc/rts/Profiling.h
ghc/rts/Proftimer.c
ghc/rts/Proftimer.h
ghc/rts/RetainerProfile.c [new file with mode: 0644]
ghc/rts/RetainerProfile.h [new file with mode: 0644]
ghc/rts/RetainerSet.c [new file with mode: 0644]
ghc/rts/RetainerSet.h [new file with mode: 0644]
ghc/rts/RtsFlags.c
ghc/rts/RtsStartup.c
ghc/rts/Schedule.c
ghc/rts/Schedule.h
ghc/rts/Stats.c
ghc/rts/Stats.h
ghc/rts/StgMiscClosures.hc
ghc/rts/StgStartup.hc
ghc/rts/StgStdThunks.hc
ghc/rts/Storage.c
ghc/rts/Storage.h
ghc/rts/Updates.hc
ghc/rts/Weak.c