Profiling: Allow heap profiling to be controlled dynamically.
This patch exposes three new functions in `GHC.Profiling` which allow heap profiling to be enabled and disabled dynamically. 1. startHeapProfTimer - Starts heap profiling with the given RTS options 2. stopHeapProfTimer - Stops heap profiling 3. requestHeapCensus - Perform a heap census on the next context switch, regardless of whether the timer is enabled or not.
Showing
- docs/users_guide/9.2.1-notes.rst 6 additions, 0 deletionsdocs/users_guide/9.2.1-notes.rst
- docs/users_guide/profiling.rst 9 additions, 1 deletiondocs/users_guide/profiling.rst
- includes/Rts.h 1 addition, 0 deletionsincludes/Rts.h
- includes/rts/Flags.h 1 addition, 0 deletionsincludes/rts/Flags.h
- includes/rts/prof/Heap.h 24 additions, 0 deletionsincludes/rts/prof/Heap.h
- libraries/base/GHC/Profiling.hs 31 additions, 1 deletionlibraries/base/GHC/Profiling.hs
- libraries/base/GHC/RTS/Flags.hsc 3 additions, 0 deletionslibraries/base/GHC/RTS/Flags.hsc
- rts/Proftimer.c 40 additions, 5 deletionsrts/Proftimer.c
- rts/Proftimer.h 2 additions, 3 deletionsrts/Proftimer.h
- rts/RtsFlags.c 12 additions, 1 deletionrts/RtsFlags.c
- rts/RtsSymbols.c 3 additions, 0 deletionsrts/RtsSymbols.c
- rts/Schedule.c 2 additions, 2 deletionsrts/Schedule.c
- rts/rts.cabal.in 1 addition, 0 deletionsrts/rts.cabal.in
- testsuite/tests/profiling/should_run/all.T 6 additions, 0 deletionstestsuite/tests/profiling/should_run/all.T
- testsuite/tests/profiling/should_run/dynamic-prof.hs 13 additions, 0 deletionstestsuite/tests/profiling/should_run/dynamic-prof.hs
- testsuite/tests/profiling/should_run/dynamic-prof2.hs 13 additions, 0 deletionstestsuite/tests/profiling/should_run/dynamic-prof2.hs
- testsuite/tests/profiling/should_run/dynamic-prof3.hs 15 additions, 0 deletionstestsuite/tests/profiling/should_run/dynamic-prof3.hs
Loading
Please register or sign in to comment