diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2021-04-01 18:38:14 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2021-04-14 14:03:30 +0000 |
commit | 3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130 (patch) | |
tree | abf7818886bab73bb0a5618f01298fd136a6b315 /src/runtime/metrics.go | |
parent | e224787fef3227587aceddbe21a792e3102d3cfb (diff) | |
download | go-3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130.tar.gz go-3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130.zip |
runtime: move next_gc and last_next_gc into gcControllerState
This change moves next_gc and last_next_gc into gcControllerState under
the names heapGoal and lastHeapGoal respectively. These are
fundamentally GC pacer related values, and so it makes sense for them to
live here.
Partially generated by
rf '
ex . {
memstats.next_gc -> gcController.heapGoal
memstats.last_next_gc -> gcController.lastHeapGoal
}
'
except for updates to comments and gcControllerState methods, where
they're accessed through the receiver, and trace-related renames of
NextGC -> HeapGoal, while we're here.
For #44167.
Change-Id: I1e871ad78a57b01be8d9f71bd662530c84853bed
Reviewed-on: https://go-review.googlesource.com/c/go/+/306603
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/metrics.go')
-rw-r--r-- | src/runtime/metrics.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/metrics.go b/src/runtime/metrics.go index ce3bac9d8f..e4343f9148 100644 --- a/src/runtime/metrics.go +++ b/src/runtime/metrics.go @@ -364,7 +364,7 @@ func (a *sysStatsAggregate) compute() { a.buckHashSys = memstats.buckhash_sys.load() a.gcMiscSys = memstats.gcMiscSys.load() a.otherSys = memstats.other_sys.load() - a.heapGoal = atomic.Load64(&memstats.next_gc) + a.heapGoal = atomic.Load64(&gcController.heapGoal) a.gcCyclesDone = uint64(memstats.numgc) a.gcCyclesForced = uint64(memstats.numforcedgc) |