[Git][ghc/ghc][wip/nonmoving-fixes] 2 commits: nonmoving: Fix small CPP bug
Ben Gamari
gitlab at gitlab.haskell.org
Thu Dec 10 04:29:10 UTC 2020
Ben Gamari pushed to branch wip/nonmoving-fixes at Glasgow Haskell Compiler / GHC
Commits:
cc9c6b5b by Ben Gamari at 2020-12-09T23:29:00-05:00
nonmoving: Fix small CPP bug
Previously an incorrect semicolon meant that we would fail to call
busy_wait_nop when spinning.
- - - - -
62265eb3 by Ben Gamari at 2020-12-09T23:29:00-05:00
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.
- - - - -
2 changed files:
- rts/sm/Evac.c
- rts/sm/NonMovingMark.c
Changes:
=====================================
rts/sm/Evac.c
=====================================
@@ -406,7 +406,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);
@@ -563,7 +565,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);
=====================================
rts/sm/NonMovingMark.c
=====================================
@@ -737,9 +737,11 @@ void updateRemembSetPushStack(Capability *cap, StgStack *stack)
// The concurrent GC has claimed the right to mark the stack.
// Wait until it finishes marking before proceeding with
// mutation.
- while (needs_upd_rem_set_mark((StgClosure *) stack));
+ while (needs_upd_rem_set_mark((StgClosure *) stack))
#if defined(PARALLEL_GC)
busy_wait_nop(); // TODO: Spinning here is unfortunate
+#else
+ ;
#endif
return;
}
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/82b6b3a6d41cc02ba6232e53ee7e9cd00f5a2a82...62265eb38a56eebc24401b43895a9fe65f545d0f
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/82b6b3a6d41cc02ba6232e53ee7e9cd00f5a2a82...62265eb38a56eebc24401b43895a9fe65f545d0f
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201209/f5396008/attachment-0001.html>
More information about the ghc-commits
mailing list