• simonmar's avatar
    [project @ 2001-11-26 16:54:21 by simonmar] · dbef766c
    simonmar authored
    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.
    dbef766c