summaryrefslogtreecommitdiff
path: root/rts/sm/NonMoving.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-05-29 23:05:10 -0400
committerBen Gamari <ben@smart-cactus.org>2020-11-01 13:57:10 -0500
commit1a184ceb8d4c3093fe1a8a5085a747943274a8d9 (patch)
treea752e2b5c192cd8daac51a24e2e21259bf2cae53 /rts/sm/NonMoving.c
parente63db32c7eb089985a1a7279a0a886a32d70ac0e (diff)
downloadhaskell-wip/perform-blocking-gc.tar.gz
rts: Introduce performBlockingMajorGCwip/perform-blocking-gc
Diffstat (limited to 'rts/sm/NonMoving.c')
-rw-r--r--rts/sm/NonMoving.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/sm/NonMoving.c b/rts/sm/NonMoving.c
index 388ceae2fd..1118bf2a5c 100644
--- a/rts/sm/NonMoving.c
+++ b/rts/sm/NonMoving.c
@@ -894,7 +894,9 @@ static void nonmovingMarkWeakPtrList(MarkQueue *mark_queue, StgWeak *dead_weak_p
}
}
-void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads)
+void nonmovingCollect(StgWeak **dead_weaks,
+ StgTSO **resurrected_threads,
+ bool force_nonmoving)
{
#if defined(THREADED_RTS)
// We can't start a new collection until the old one has finished
@@ -973,7 +975,7 @@ void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads)
// again for the sync if we let it go, because it'll immediately start doing
// a major GC, because that's what we do when exiting scheduler (see
// exitScheduler()).
- if (sched_state == SCHED_RUNNING) {
+ if (sched_state == SCHED_RUNNING && !force_nonconcurrent) {
concurrent_coll_running = true;
nonmoving_write_barrier_enabled = true;
debugTrace(DEBUG_nonmoving_gc, "Starting concurrent mark thread");