]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix nStackRoots comment about stack roots
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 23 Dec 2020 17:12:44 +0000 (17:12 +0000)
committerMichael Knyszek <mknyszek@google.com>
Wed, 23 Dec 2020 17:30:35 +0000 (17:30 +0000)
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 <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mgcmark.go

index 5a24cdac88aff06fb8c6f876e93d4461a9dab5fc..52267e6fb084eeefcea51e1dd8320225c8debc24 100644 (file)
@@ -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