rts: eras profiling mode
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
Showing
- compiler/GHC/Cmm/Parser.y 1 addition, 1 deletioncompiler/GHC/Cmm/Parser.y
- compiler/GHC/StgToCmm/Prof.hs 62 additions, 25 deletionscompiler/GHC/StgToCmm/Prof.hs
- docs/users_guide/profiling.rst 23 additions, 0 deletionsdocs/users_guide/profiling.rst
- libraries/ghc-experimental/ghc-experimental.cabal 1 addition, 2 deletionslibraries/ghc-experimental/ghc-experimental.cabal
- libraries/ghc-experimental/src/Dummy.hs 0 additions, 10 deletionslibraries/ghc-experimental/src/Dummy.hs
- libraries/ghc-experimental/src/GHC/Profiling/Eras.hs 20 additions, 0 deletionslibraries/ghc-experimental/src/GHC/Profiling/Eras.hs
- libraries/ghc-internal/src/GHC/Profiling.hs 1 addition, 0 deletionslibraries/ghc-internal/src/GHC/Profiling.hs
- rts/CloneStack.c 1 addition, 0 deletionsrts/CloneStack.c
- rts/Continuation.c 1 addition, 0 deletionsrts/Continuation.c
- rts/Heap.c 1 addition, 0 deletionsrts/Heap.c
- rts/Interpreter.c 1 addition, 0 deletionsrts/Interpreter.c
- rts/LdvProfile.h 3 additions, 1 deletionrts/LdvProfile.h
- rts/Messages.c 1 addition, 0 deletionsrts/Messages.c
- rts/PrimOps.cmm 8 additions, 8 deletionsrts/PrimOps.cmm
- rts/ProfHeap.c 43 additions, 15 deletionsrts/ProfHeap.c
- rts/ProfHeap.h 0 additions, 5 deletionsrts/ProfHeap.h
- rts/Profiling.c 1 addition, 0 deletionsrts/Profiling.c
- rts/RaiseAsync.c 1 addition, 0 deletionsrts/RaiseAsync.c
- rts/RtsAPI.c 1 addition, 0 deletionsrts/RtsAPI.c
- rts/RtsFlags.c 45 additions, 0 deletionsrts/RtsFlags.c
Loading