summaryrefslogtreecommitdiff
path: root/rts/RetainerProfile.c
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-06-20 20:13:45 +0200
committerDaniel Gröber <dxld@darkboxed.org>2019-09-22 15:18:10 +0200
commitf3bb73973284b6d60795b63049af5716ab081b34 (patch)
treef79be23a942d3ec05703105b70b9074664d15f08 /rts/RetainerProfile.c
parentb92ed68a7c452685e21debec947b11520e70f8da (diff)
downloadhaskell-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/RetainerProfile.c')
-rw-r--r--rts/RetainerProfile.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index 32d93c800a..d2329c45fb 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -1038,9 +1038,7 @@ initRetainerProfiling( void )
void
endRetainerProfiling( void )
{
-#if defined(SECOND_APPROACH)
outputAllRetainerSet(prof_file);
-#endif
}
/* -----------------------------------------------------------------------------
@@ -1191,14 +1189,6 @@ isRetainer( StgClosure *c )
* This function does NOT return the retainer(s) of *c.
* Invariants:
* *c must be a retainer.
- * Note:
- * Depending on the definition of this function, the maintenance of retainer
- * sets can be made easier. If most retainer sets are likely to be created
- * again across garbage collections, refreshAllRetainerSet() in
- * RetainerSet.c can simply do nothing.
- * If this is not the case, we can free all the retainer sets and
- * re-initialize the hash table.
- * See refreshAllRetainerSet() in RetainerSet.c.
* -------------------------------------------------------------------------- */
static INLINE retainer
getRetainerFrom( StgClosure *c )
@@ -1996,11 +1986,7 @@ retainerProfile(void)
retainer sets.
*/
initializeTraverseStack(&g_retainerTraverseState);
-#if defined(DEBUG_RETAINER)
initializeAllRetainerSet();
-#else
- refreshAllRetainerSet();
-#endif
computeRetainerSet(&g_retainerTraverseState);
#if defined(DEBUG_RETAINER)
@@ -2044,11 +2030,6 @@ retainerProfile(void)
// post-processing
closeTraverseStack(&g_retainerTraverseState);
-#if defined(DEBUG_RETAINER)
- closeAllRetainerSet();
-#else
- // Note that there is no post-processing for the retainer sets.
-#endif
retainerGeneration++;
stat_endRP(