diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-12-09 23:10:22 -0500 |
---|---|---|
committer | Ben Gamari <ben@well-typed.com> | 2020-12-20 21:05:13 -0500 |
commit | a2731d49d95f7397a6a267a322ed75b0c3a5c246 (patch) | |
tree | b6317a10d31ebaa7c79ce5f7312a48314b62054e | |
parent | a13bd3f147d63968bc50df6f43154bf2a05809df (diff) | |
download | haskell-a2731d49d95f7397a6a267a322ed75b0c3a5c246.tar.gz |
nonmoving: Don't push objects during deadlock detect GC
Previously we would push large objects and compact regions to the mark
queue during the deadlock detect GC, resulting in failure to detect
deadlocks.
-rw-r--r-- | rts/sm/Evac.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index 4355e96399..ea40563499 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -441,7 +441,9 @@ evacuate_large(StgPtr p) __atomic_fetch_or(&bd->flags, BF_NONMOVING, __ATOMIC_ACQ_REL); // See Note [Non-moving GC: Marking evacuated objects]. - markQueuePushClosureGC(&gct->cap->upd_rem_set.queue, (StgClosure *) p); + if (major_gc && !deadlock_detect_gc) { + markQueuePushClosureGC(&gct->cap->upd_rem_set.queue, (StgClosure *) p); + } } initBdescr(bd, new_gen, new_gen->to); @@ -598,7 +600,9 @@ evacuate_compact (StgPtr p) __atomic_fetch_or(&bd->flags, BF_NONMOVING, __ATOMIC_RELAXED); // See Note [Non-moving GC: Marking evacuated objects]. - markQueuePushClosureGC(&gct->cap->upd_rem_set.queue, (StgClosure *) str); + if (major_gc && !deadlock_detect_gc) { + markQueuePushClosureGC(&gct->cap->upd_rem_set.queue, (StgClosure *) str); + } } initBdescr(bd, new_gen, new_gen->to); |