From 9424f0cd96dcf80fd2a7fb62899219f9abbc7044 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sat, 21 Jan 2023 16:19:09 -0500 Subject: nonmoving: Fix Note references Some references to Note [Deadlock detection under the non-moving collector] were missing an article. (cherry picked from commit 43fda6487f729f8c627dbb2abbfc027444d54e52) --- rts/Schedule.c | 2 +- rts/sm/Evac.c | 4 ++-- rts/sm/GC.c | 2 +- rts/sm/GC.h | 2 +- rts/sm/NonMoving.c | 2 +- rts/sm/NonMovingMark.c | 2 +- rts/sm/Scav.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rts/Schedule.c b/rts/Schedule.c index dd0775ba6a..2668e2f6ae 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -1562,7 +1562,7 @@ void releaseAllCapabilities(uint32_t n, Capability *keep_cap, Task *task) * Perform a garbage collection if necessary * -------------------------------------------------------------------------- */ -// N.B. See Note [Deadlock detection under nonmoving collector] for rationale +// N.B. See Note [Deadlock detection under the nonmoving collector] for rationale // behind deadlock_detect argument. static void scheduleDoGC (Capability **pcap, Task *task USED_IF_THREADS, diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index 5655dad9be..f4696973b0 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -122,7 +122,7 @@ alloc_in_moving_heap (uint32_t size, uint32_t gen_no) static StgPtr alloc_for_copy_nonmoving (uint32_t size, uint32_t gen_no) { - /* See Note [Deadlock detection under nonmoving collector]. */ + /* See Note [Deadlock detection under the nonmoving collector]. */ if (deadlock_detect_gc) { return alloc_in_nonmoving_heap(size); } @@ -424,7 +424,7 @@ evacuate_large(StgPtr p) new_gen_no = bd->dest_no; if (RTS_UNLIKELY(deadlock_detect_gc)) { - /* See Note [Deadlock detection under nonmoving collector]. */ + /* See Note [Deadlock detection under the nonmoving collector]. */ new_gen_no = oldest_gen->no; } else if (new_gen_no < gct->evac_gen_no) { if (gct->eager_promotion) { diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 4a028634c9..826765fd32 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -351,7 +351,7 @@ GarbageCollect (uint32_t collect_gen, N = collect_gen; major_gc = (N == RtsFlags.GcFlags.generations-1); - /* See Note [Deadlock detection under nonmoving collector]. */ + /* See Note [Deadlock detection under the nonmoving collector]. */ deadlock_detect_gc = deadlock_detect; #if defined(THREADED_RTS) diff --git a/rts/sm/GC.h b/rts/sm/GC.h index 25de588534..4132160c91 100644 --- a/rts/sm/GC.h +++ b/rts/sm/GC.h @@ -34,7 +34,7 @@ bool doIdleGCWork(Capability *cap, bool all); extern uint32_t N; extern bool major_gc; -/* See Note [Deadlock detection under nonmoving collector]. */ +/* See Note [Deadlock detection under the nonmoving collector]. */ extern bool deadlock_detect_gc; extern bool unload_mark_needed; diff --git a/rts/sm/NonMoving.c b/rts/sm/NonMoving.c index b11ef6da16..3616e56997 100644 --- a/rts/sm/NonMoving.c +++ b/rts/sm/NonMoving.c @@ -347,7 +347,7 @@ Mutex concurrent_coll_finished_lock; * Marking evacuated objects] in Evac.c. * * - * Note [Deadlock detection under the non-moving collector] + * Note [Deadlock detection under the nonmoving collector] * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * In GHC the garbage collector is responsible for identifying deadlocked * programs. Providing for this responsibility is slightly tricky in the diff --git a/rts/sm/NonMovingMark.c b/rts/sm/NonMovingMark.c index d7fb1af8a8..8e6bf27114 100644 --- a/rts/sm/NonMovingMark.c +++ b/rts/sm/NonMovingMark.c @@ -482,7 +482,7 @@ markQueuePushClosureGC (MarkQueue *q, StgClosure *p) } /* We should not make it here if we are doing a deadlock detect GC. - * See Note [Deadlock detection under nonmoving collector]. + * See Note [Deadlock detection under the nonmoving collector]. * This is actually no longer true due to call in nonmovingScavengeOne * introduced due to Note [Dirty flags in the non-moving collector] * (see NonMoving.c). diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c index 69ccea7bc3..6f114b184d 100644 --- a/rts/sm/Scav.c +++ b/rts/sm/Scav.c @@ -441,7 +441,7 @@ scavenge_block (bdescr *bd) p = bd->u.scan; - // Sanity check: See Note [Deadlock detection under nonmoving collector]. + // Sanity check: See Note [Deadlock detection under the nonmoving collector]. #if defined(DEBUG) if (RtsFlags.GcFlags.useNonmoving && deadlock_detect_gc) { ASSERT(bd->gen == oldest_gen); -- cgit v1.2.1