diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-06-23 18:41:40 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-09-22 15:18:10 +0200 |
commit | 64ec45a798f9b335ab9ba8cb2c7bb9ae0f056ba1 (patch) | |
tree | bbaf428de7cec92e1b92a28f914cda00015ab3fd /rts/RetainerSet.c | |
parent | b7e15d17a48286548f26f93594fb1b0b700dd422 (diff) | |
download | haskell-64ec45a798f9b335ab9ba8cb2c7bb9ae0f056ba1.tar.gz |
rts: retainer: Reduce DEBUG_RETAINER ifdef noise
Keeping track of the maximum stack seems like a good idea in all
configurations. The associated ASSERTs only materialize in debug mode but
having the statistic is nice.
To make the debug code less prone to bitrotting I introduce a function
'debug()' which doesn't actually print by default and is #define'd away
only when the standard DEBUG define is off.
Diffstat (limited to 'rts/RetainerSet.c')
-rw-r--r-- | rts/RetainerSet.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/rts/RetainerSet.c b/rts/RetainerSet.c index 98cfcec225..556bcc0eab 100644 --- a/rts/RetainerSet.c +++ b/rts/RetainerSet.c @@ -127,9 +127,7 @@ addElement(retainer r, RetainerSet *rs) RetainerSet *nrs; // New Retainer Set StgWord hk; // Hash Key -#if defined(DEBUG_RETAINER) // debugBelch("addElement(%p, %p) = ", r, rs); -#endif ASSERT(rs != NULL); ASSERT(rs->num <= RtsFlags.ProfFlags.maxRetainerSetSize); @@ -167,9 +165,8 @@ addElement(retainer r, RetainerSet *rs) if (rs->element[i] != nrs->element[i + 1]) break; if (i < rs->num) continue; -#if defined(DEBUG_RETAINER) // debugBelch("%p\n", nrs); -#endif + // The set we are seeking already exists! return nrs; } @@ -190,9 +187,7 @@ addElement(retainer r, RetainerSet *rs) hashTable[hash(hk)] = nrs; -#if defined(DEBUG_RETAINER) // debugBelch("%p\n", nrs); -#endif return nrs; } |