diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-10-25 08:18:08 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-10-25 08:18:30 +0100 |
commit | 45eaeee3d7f5ef2efbc72769ebe6b988a867692a (patch) | |
tree | d097cc87a89860847b752cb346042ea369c824ad /includes/rts/storage/ClosureMacros.h | |
parent | 29db17fe02786a0af543e0f6de1d4ee4cca7e299 (diff) | |
download | haskell-45eaeee3d7f5ef2efbc72769ebe6b988a867692a.tar.gz |
Another attempt to fix the conditions for slop-zeroing
Also refactor the #defines to hopefully make it clearer what's going
on.
Diffstat (limited to 'includes/rts/storage/ClosureMacros.h')
-rw-r--r-- | includes/rts/storage/ClosureMacros.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h index c4634f1c1e..8933e85eb7 100644 --- a/includes/rts/storage/ClosureMacros.h +++ b/includes/rts/storage/ClosureMacros.h @@ -485,7 +485,10 @@ INLINE_HEADER StgWord8 *mutArrPtrsCard (StgMutArrPtrs *a, W_ n) -------------------------------------------------------------------------- */ -#if defined(PROFILING) || (!defined(THREADED_RTS) && defined(DEBUG)) +#define ZERO_SLOP_FOR_LDV_PROF (defined(PROFILING)) +#define ZERO_SLOP_FOR_SANITY_CHECK (defined(DEBUG) && !defined(THREADED_RTS)) + +#if ZERO_SLOP_FOR_LDV_PROF || ZERO_SLOP_FOR_SANITY_CHECK #define OVERWRITING_CLOSURE(c) overwritingClosure(c) #else #define OVERWRITING_CLOSURE(c) /* nothing */ @@ -500,8 +503,8 @@ EXTERN_INLINE void overwritingClosure (StgClosure *p) { nat size, i; -#if defined(PROFILING) && !defined(DEBUG) - // see Note [zeroing slop] +#if ZERO_SLOP_FOR_LDV_PROF && !ZERO_SLOP_FOR_SANITY_CHECK + // see Note [zeroing slop], also #8402 if (era <= 0) return; #endif |