diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-07-10 17:16:33 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-16 02:41:23 -0400 |
commit | 373c9cb379bd64c4d295becf3afce122a6e199f4 (patch) | |
tree | d1d50715bb8d9fd90865268d54a2937839866d4f /rts/RtsStartup.c | |
parent | db948daea6c01c073f8d09a79fa5adda279fbf0c (diff) | |
download | haskell-373c9cb379bd64c4d295becf3afce122a6e199f4.tar.gz |
rts: Divorce init of Heap profiler from CCS profiler
Currently initProfiling gets defined by Profiling.c only if PROFILING is
defined. Otherwise the ProfHeap.c defines it.
This is just needlessly complicated so in this commit I make Profiling and
ProfHeap into properly seperate modules and call their respective init
functions from RtsStartup.c.
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r-- | rts/RtsStartup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 5e5aef3505..a202d53960 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -31,6 +31,7 @@ #include "StaticPtrTable.h" #include "Hash.h" #include "Profiling.h" +#include "ProfHeap.h" #include "Timer.h" #include "Globals.h" #include "FileLock.h" @@ -300,7 +301,10 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) initThreadLabelTable(); #endif +#if defined(PROFILING) initProfiling(); +#endif + initHeapProfiling(); /* start the virtual timer 'subsystem'. */ initTimer(); @@ -469,8 +473,13 @@ hs_exit_(bool wait_foreign) reportCCSProfiling(); #endif + endHeapProfiling(); + freeHeapProfiling(); + +#if defined(PROFILING) endProfiling(); freeProfiling(); +#endif #if defined(PROFILING) // Originally, this was in report_ccs_profiling(). Now, retainer |