cvs commit: fptools/ghc/rts GC.c LdvProfile.c LdvProfile.h ProfHeap.c ProfHeap.h Profiling.c RetainerProfile.c RetainerProfile.h RetainerSet.c RetainerSet.h RtsFlags.c RtsStartup.c Schedule.c Stats.c Stats.h Storage.c Weak.c ...

Simon Marlow simonmar@glass.cse.ogi.edu
Mon, 26 Nov 2001 08:54:23 -0800


simonmar    2001/11/26 08:54:22 PST

  Modified files:
    ghc/rts              GC.c LdvProfile.c LdvProfile.h ProfHeap.c 
                         ProfHeap.h Profiling.c RetainerProfile.c 
                         RetainerProfile.h RetainerSet.c 
                         RetainerSet.h RtsFlags.c RtsStartup.c 
                         Schedule.c Stats.c Stats.h Storage.c 
                         Weak.c 
    ghc/includes         Closures.h Constants.h RtsFlags.h Stg.h 
                         StgLdvProf.h StgProf.h 
  Removed files:
    ghc/includes         StgRetainerProf.h 
  Log:
  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.
  
  Revision  Changes    Path
  1.128     +1 -3      fptools/ghc/rts/GC.c
  1.2       +5 -461    fptools/ghc/rts/LdvProfile.c
  1.2       +21 -41    fptools/ghc/rts/LdvProfile.h
  1.27      +353 -314  fptools/ghc/rts/ProfHeap.c
  1.3       +6 -1      fptools/ghc/rts/ProfHeap.h
  1.27      +1 -10     fptools/ghc/rts/Profiling.c
  1.2       +10 -181   fptools/ghc/rts/RetainerProfile.c
  1.2       +20 -1     fptools/ghc/rts/RetainerProfile.h
  1.2       +9 -98     fptools/ghc/rts/RetainerSet.c
  1.2       +64 -3     fptools/ghc/rts/RetainerSet.h
  1.53      +109 -80   fptools/ghc/rts/RtsFlags.c
  1.57      +1 -21     fptools/ghc/rts/RtsStartup.c
  1.108     +3 -28     fptools/ghc/rts/Schedule.c
  1.39      +28 -34    fptools/ghc/rts/Stats.c
  1.14      +8 -6      fptools/ghc/rts/Stats.h
  1.55      +1 -1      fptools/ghc/rts/Storage.c
  1.20      +1 -10     fptools/ghc/rts/Weak.c
  1.30      +2 -2      fptools/ghc/includes/Closures.h
  1.19      +2 -2      fptools/ghc/includes/Constants.h
  1.40      +4 -7      fptools/ghc/includes/RtsFlags.h
  1.42      +1 -2      fptools/ghc/includes/Stg.h
  1.2       +15 -74    fptools/ghc/includes/StgLdvProf.h
  1.15      +1 -3      fptools/ghc/includes/StgProf.h