Skip to content
  • Duncan Coutts's avatar
    Add new eventlog events for various heap and GC statistics · 65aaa9b2
    Duncan Coutts authored
    They cover much the same info as is available via the GHC.Stats module
    or via the '+RTS -s' textual output, but via the eventlog and with a
    better sampling frequency.
    
    We have three new generic heap info events and two very GHC-specific
    ones. (The hope is the general ones are usable by other implementations
    that use the same eventlog system, or indeed not so sensitive to changes
    in GHC itself.)
    
    The general ones are:
    
     * total heap mem allocated since prog start, on a per-HEC basis
     * current size of the heap (MBlocks reserved from OS for the heap)
     * current size of live data in the heap
    
    Currently these are all emitted by GHC at GC time (live data only at
    major GC).
    
    The GHC specific ones are:
    
     * an event giving various static heap paramaters:
       * number of generations (usually 2)
       * max size if any
       * nursary size
       * MBlock and block sizes
     * a event emitted on each GC containing:
       * GC generation (usually just 0,1)
       * total bytes copied
       * bytes lost to heap slop and fragmentation
       * the number of threads in the parallel GC (1 for serial)
       * the maximum number of bytes copied by any par GC thread
       * the total number of bytes copied by all par GC threads
         (these last three can be used to calculate an estimate of the
          work balance in parallel GCs)
    65aaa9b2