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/Profiling.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/Profiling.c')
-rw-r--r-- | rts/Profiling.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/rts/Profiling.c b/rts/Profiling.c index 3c7f52b6f4..4931898fe0 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -51,9 +51,6 @@ static unsigned int CCS_ID = 1; static char *prof_filename; /* prof report file name = <program>.prof */ FILE *prof_file; -static char *hp_filename; /* heap profile (hp2ps style) log file */ -FILE *hp_file; - // List of all cost centres. Used for reporting. CostCentre *CC_LIST = NULL; // All cost centre stacks temporarily appear here, to be able to make CCS_MAIN a @@ -190,10 +187,6 @@ void initProfiling (void) if (RtsFlags.CcFlags.doCostCentres) { initTimeProfiling(); } - - if (RtsFlags.ProfFlags.doHeapProfile) { - initHeapProfiling(); - } } // @@ -280,19 +273,6 @@ initProfilingLogFile(void) } } } - - if (RtsFlags.ProfFlags.doHeapProfile) { - /* Initialise the log file name */ - hp_filename = arenaAlloc(prof_arena, strlen(stem) + 6); - sprintf(hp_filename, "%s.hp", stem); - - /* open the log file */ - if ((hp_file = __rts_fopen(hp_filename, "w")) == NULL) { - debugBelch("Can't open profiling report file %s\n", - hp_filename); - RtsFlags.ProfFlags.doHeapProfile = 0; - } - } } void @@ -308,9 +288,6 @@ endProfiling ( void ) if (RtsFlags.CcFlags.doCostCentres) { stopProfTimer(); } - if (RtsFlags.ProfFlags.doHeapProfile) { - endHeapProfiling(); - } } /* ----------------------------------------------------------------------------- |