[Git][ghc/ghc][wip/eras-profiling-clean] rts: eras profiling mode

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Tue Jan 16 12:16:47 UTC 2024



Matthew Pickering pushed to branch wip/eras-profiling-clean at Glasgow Haskell Compiler / GHC


Commits:
1c9bb98c by Matthew Pickering at 2024-01-16T12:16:19+00:00
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 in 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`.

Fixes #24332

- - - - -


30 changed files:

- compiler/GHC/Cmm/Parser.y
- compiler/GHC/StgToCmm/Prof.hs
- docs/users_guide/profiling.rst
- libraries/base/base.cabal
- libraries/base/src/GHC/Profiling.hs
- + libraries/base/src/GHC/Profiling/Eras.hs
- rts/CloneStack.c
- rts/Continuation.c
- rts/Heap.c
- rts/Interpreter.c
- rts/LdvProfile.h
- rts/Messages.c
- rts/PrimOps.cmm
- rts/ProfHeap.c
- rts/ProfHeap.h
- rts/Profiling.c
- rts/RaiseAsync.c
- rts/RtsAPI.c
- rts/RtsFlags.c
- rts/RtsFlags.h
- rts/RtsSymbols.c
- rts/STM.c
- rts/Schedule.c
- rts/ThreadLabels.c
- rts/Threads.c
- rts/Updates.h
- rts/Weak.c
- rts/eventlog/EventLog.c
- rts/include/rts/EventLogFormat.h
- rts/include/rts/Flags.h


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1c9bb98c5346e2689c2a2f353919073ae9c077f4

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1c9bb98c5346e2689c2a2f353919073ae9c077f4
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240116/428c94dc/attachment.html>


More information about the ghc-commits mailing list