From: Michael Pratt Date: Tue, 7 Jul 2020 21:55:40 +0000 (-0400) Subject: runtime: drop redundant gcBlackenEnabled reset X-Git-Tag: go1.16beta1~562 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=db185e543fe471c522790b7d93291e786dc54a84;p=gostls13.git runtime: drop redundant gcBlackenEnabled reset This reset of gcBlackenEnabled is a no-op because it was already reset almost immediately before in gcMarkDone, which is the only caller of gcMarkTermination. Adjust the comment to clarify setGCPhase a bit more. We are coming from _GCmark, so write barriers are already enabled. Change-Id: Ieac2dadf33c3c5a44e8a25a499dea8cfe03b8d73 Reviewed-on: https://go-review.googlesource.com/c/go/+/241357 Run-TryBot: Michael Pratt TryBot-Result: Go Bot Trust: Michael Pratt Reviewed-by: Michael Knyszek --- diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index 65ac654b14..c42c7fbd29 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -1558,10 +1558,10 @@ top: gcMarkTermination(nextTriggerRatio) } +// World must be stopped and mark assists and background workers must be +// disabled. func gcMarkTermination(nextTriggerRatio float64) { - // World is stopped. - // Start marktermination which includes enabling the write barrier. - atomic.Store(&gcBlackenEnabled, 0) + // Start marktermination (write barrier remains enabled for now). setGCPhase(_GCmarktermination) work.heap1 = memstats.heap_live