diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2020-12-23 17:12:44 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2020-12-23 17:30:35 +0000 |
commit | fb96f07e1a45b9ec41158732a34aee8c2ccc2eaf (patch) | |
tree | 540df00797bdb2b4eec2f6e0df99f99cbe10290a /src/runtime/mgcmark.go | |
parent | d1502b3c7270e655d3306d65f5dd61438626a1a9 (diff) | |
download | go-fb96f07e1a45b9ec41158732a34aee8c2ccc2eaf.tar.gz go-fb96f07e1a45b9ec41158732a34aee8c2ccc2eaf.zip |
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 <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/mgcmark.go')
-rw-r--r-- | src/runtime/mgcmark.go | 3 |
1 files changed, 1 insertions, 2 deletions
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 |