mirror of
https://github.com/golang/go
synced 2024-11-22 09:14:40 -07:00
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>
This commit is contained in:
parent
d1502b3c72
commit
fb96f07e1a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user