[project @ 2001-11-26 16:54:21 by simonmar]
authorsimonmar <unknown>
Mon, 26 Nov 2001 16:54:22 +0000 (16:54 +0000)
committersimonmar <unknown>
Mon, 26 Nov 2001 16:54:22 +0000 (16:54 +0000)
commitdbef766ce79e37a74468a07a93b15ba1f06fe8f8
tree6230721a46c1d7b9c10387a4e6cf6cca08a3ccd1
parent5680ea4b2035198981739e24ad04cd0e0d133172
[project @ 2001-11-26 16:54:21 by simonmar]
Profiling cleanup.

This commit eliminates some duplication in the various heap profiling
subsystems, and generally centralises much of the machinery.  The key
concept is the separation of a heap *census* (which is now done in one
place only instead of three) from the calculation of retainer sets.
Previously the retainer profiling code also did a heap census on the
fly, and lag-drag-void profiling had its own census machinery.

Value-adds:

   - you can now restrict a heap profile to certain retainer sets,
     but still display by cost centre (or type, or closure or
     whatever).

   - I've added an option to restrict the maximum retainer set size
     (+RTS -R<size>, defaulting to 8).

   - I've cleaned up the heap profiling options at the request of
     Simon PJ.  See the help text for details.  The new scheme
     is backwards compatible with the old.

   - I've removed some odd bits of LDV or retainer profiling-specific
     code from various parts of the system.

   - the time taken doing heap censuses (and retainer set calculation)
     is now accurately reported by the RTS when you say +RTS -Sstderr.

Still to come:

   - restricting a profile to a particular biography
     (lag/drag/void/use).  This requires keeping old heap censuses
     around, but the infrastructure is now in place to do this.
24 files changed:
ghc/includes/Closures.h
ghc/includes/Constants.h
ghc/includes/RtsFlags.h
ghc/includes/Stg.h
ghc/includes/StgLdvProf.h
ghc/includes/StgProf.h
ghc/includes/StgRetainerProf.h [deleted file]
ghc/rts/GC.c
ghc/rts/LdvProfile.c
ghc/rts/LdvProfile.h
ghc/rts/ProfHeap.c
ghc/rts/ProfHeap.h
ghc/rts/Profiling.c
ghc/rts/RetainerProfile.c
ghc/rts/RetainerProfile.h
ghc/rts/RetainerSet.c
ghc/rts/RetainerSet.h
ghc/rts/RtsFlags.c
ghc/rts/RtsStartup.c
ghc/rts/Schedule.c
ghc/rts/Stats.c
ghc/rts/Stats.h
ghc/rts/Storage.c
ghc/rts/Weak.c