summaryrefslogtreecommitdiff
path: root/rts/sm/GC.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-10-31 12:38:06 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-11-01 10:13:16 +0000
commit2073e3ecc5dd0e37e097bd331f19a782eb96785d (patch)
treed52b28a45e585ac641af72e0003a941746dbe564 /rts/sm/GC.c
parent232f1a2702684fe7f82a084213714adfa6162392 (diff)
downloadhaskell-2073e3ecc5dd0e37e097bd331f19a782eb96785d.tar.gz
Don't clearNurseries() in parallel with -debug
It makes sanity-checking fail.
Diffstat (limited to 'rts/sm/GC.c')
-rw-r--r--rts/sm/GC.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 8b92ca82cb..b9485f2c36 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -404,7 +404,7 @@ GarbageCollect (nat collect_gen,
break;
}
- if (n_gc_threads != 1) {
+ if (!DEBUG_IS_ON && n_gc_threads != 1) {
gct->allocated = clearNursery(cap);
}
@@ -638,7 +638,7 @@ GarbageCollect (nat collect_gen,
}
// Reset the nursery: make the blocks empty
- if (n_gc_threads == 1) {
+ if (DEBUG_IS_ON || n_gc_threads == 1) {
for (n = 0; n < n_capabilities; n++) {
allocated += clearNursery(&capabilities[n]);
}
@@ -1074,7 +1074,9 @@ gcWorkerThread (Capability *cap)
scavenge_until_all_done();
- gct->allocated = clearNursery(cap);
+ if (!DEBUG_IS_ON) {
+ gct->allocated = clearNursery(cap);
+ }
#ifdef THREADED_RTS
// Now that the whole heap is marked, we discard any sparks that