diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-06-20 20:13:45 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-09-22 15:18:10 +0200 |
commit | f3bb73973284b6d60795b63049af5716ab081b34 (patch) | |
tree | f79be23a942d3ec05703105b70b9074664d15f08 /rts/RetainerSet.c | |
parent | b92ed68a7c452685e21debec947b11520e70f8da (diff) | |
download | haskell-f3bb73973284b6d60795b63049af5716ab081b34.tar.gz |
rts: RetainerSet: Remove obsolete fist/second-approach choice
In the old code when DEBUG_RETAINER was set, FIRST_APPROACH is
implied. However ProfHeap.c now depends on printRetainerSetShort which is
only available with SECOND_APPROACH. This is because with FIRST_APPROACH
retainerProfile() will free all retainer sets before returning so by the
time ProfHeap calls dumpCensus the retainer set pointers are segfaulty.
Since all of this debugging code obviously hasn't been compiled in ages
anyways I'm taking the liberty of just removing it.
Remember guys: Dead code is a liability not an asset :)
Diffstat (limited to 'rts/RetainerSet.c')
-rw-r--r-- | rts/RetainerSet.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/rts/RetainerSet.c b/rts/RetainerSet.c index 634035b0d0..98cfcec225 100644 --- a/rts/RetainerSet.c +++ b/rts/RetainerSet.c @@ -74,25 +74,6 @@ initializeAllRetainerSet(void) } /* ----------------------------------------------------------------------------- - * Refreshes all pools for reuse and initializes hashTable[]. - * -------------------------------------------------------------------------- */ -void -refreshAllRetainerSet(void) -{ -#if defined(FIRST_APPROACH) - int i; - - // first approach: completely refresh - arenaFree(arena); - arena = newArena(); - - for (i = 0; i < HASH_TABLE_SIZE; i++) - hashTable[i] = NULL; - nextId = 2; -#endif /* FIRST_APPROACH */ -} - -/* ----------------------------------------------------------------------------- * Frees all pools. * -------------------------------------------------------------------------- */ void @@ -229,7 +210,6 @@ printRetainer(FILE *f, retainer ccs) * printRetainerSetShort() should always display the same output for * a given retainer set regardless of the time of invocation. * -------------------------------------------------------------------------- */ -#if defined(SECOND_APPROACH) void printRetainerSetShort(FILE *f, RetainerSet *rs, W_ total_size, uint32_t max_length) { @@ -265,14 +245,12 @@ printRetainerSetShort(FILE *f, RetainerSet *rs, W_ total_size, uint32_t max_leng fputs(tmp, f); traceHeapProfSampleString(0, tmp, total_size); } -#endif /* SECOND_APPROACH */ /* ----------------------------------------------------------------------------- * Dump the contents of each retainer set into the log file at the end * of the run, so the user can find out for a given retainer set ID * the full contents of that set. * -------------------------------------------------------------------------- */ -#if defined(SECOND_APPROACH) void outputAllRetainerSet(FILE *prof_file) { @@ -333,6 +311,5 @@ outputAllRetainerSet(FILE *prof_file) stgFree(rsArray); } -#endif /* SECOND_APPROACH */ #endif /* PROFILING */ |