runtime: compute data and bss root work units in one loop

Change-Id: Ia730ca244c83db925879de206809938aeb969cdd
GitHub-Last-Rev: 711b8b8b93
GitHub-Pull-Request: golang/go#64349
Reviewed-on: https://go-review.googlesource.com/c/go/+/544478
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
jeffery 2024-01-24 14:45:06 +00:00 committed by Keith Randall
parent f9c0423ec8
commit 0b1b6c1589

View file

@ -73,9 +73,7 @@ func gcMarkRootPrepare() {
if nDataRoots > work.nDataRoots {
work.nDataRoots = nDataRoots
}
}
for _, datap := range activeModules() {
nBSSRoots := nBlocks(datap.ebss - datap.bss)
if nBSSRoots > work.nBSSRoots {
work.nBSSRoots = nBSSRoots