From: Michael Anthony Knyszek Date: Wed, 23 Dec 2020 17:12:44 +0000 (+0000) Subject: runtime: fix nStackRoots comment about stack roots X-Git-Tag: go1.16rc1~142 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fb96f07e1a45b9ec41158732a34aee8c2ccc2eaf;p=gostls13.git runtime: fix nStackRoots comment about stack roots A comment in mgcmark.go indicates that we scan stacks a second time but we don't, at least not since changing to the hybrid write barrier. Change-Id: I9376adbb6d8b6dd9dc3cee62e077b5dfb8a3fdde Reviewed-on: https://go-review.googlesource.com/c/go/+/279797 Trust: Michael Knyszek Reviewed-by: Michael Pratt Reviewed-by: Austin Clements --- diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go index 5a24cdac88..52267e6fb0 100644 --- a/src/runtime/mgcmark.go +++ b/src/runtime/mgcmark.go @@ -101,8 +101,7 @@ func gcMarkRootPrepare() { // Gs may be created after this point, but it's okay that we // ignore them because they begin life without any roots, so // there's nothing to scan, and any roots they create during - // the concurrent phase will be scanned during mark - // termination. + // the concurrent phase will be caught by the write barrier. work.nStackRoots = int(atomic.Loaduintptr(&allglen)) work.markrootNext = 0