Skip to content
  • Matthew Pickering's avatar
    rts: eras profiling mode · b0293f78
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    The eras profiling mode is useful for tracking the life-time of
    closures. When a closure is written, the current era is recorded in the
    profiling header. This records the era in which the closure was created.
    
    * Enable with -he
    * User mode: Use functions ghc-experimental module GHC.Profiling.Eras to modify the era
    * Automatically: --automatic-era-increment, increases the user era on major
      collections
    * The first era is era 1
    * -he<era> can be used with other profiling modes to select a specific
      era
    
    If you just want to record the era but not to perform heap profiling you
    can use `-he --no-automatic-heap-samples`.
    
    https://well-typed.com/blog/2024/01/ghc-eras-profiling/
    
    Fixes #24332
    b0293f78