mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: convert gcController.globalsScan to atomic type
For #53821. Change-Id: I92bd33e355c868ae229395fd9c98fdb10768d03d Reviewed-on: https://go-review.googlesource.com/c/go/+/417779 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
02fb9b8ca9
commit
b8f4847d6f
4 changed files with 9 additions and 12 deletions
|
|
@ -1323,7 +1323,7 @@ func (c *GCController) StartCycle(stackSize, globalsSize uint64, scannableFrac f
|
|||
trigger = c.heapMarked
|
||||
}
|
||||
c.maxStackScan.Store(stackSize)
|
||||
c.globalsScan = globalsSize
|
||||
c.globalsScan.Store(globalsSize)
|
||||
c.heapLive.Store(trigger)
|
||||
c.heapScan.Add(int64(float64(trigger-c.heapMarked) * scannableFrac))
|
||||
c.startCycle(0, gomaxprocs, gcTrigger{kind: gcTriggerHeap})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue