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/mstats.go | |
| parent | e224787fef3227587aceddbe21a792e3102d3cfb (diff) | |
| download | go-3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130.tar.xz | |
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/mstats.go')
| -rw-r--r-- | src/runtime/mstats.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/runtime/mstats.go b/src/runtime/mstats.go index cd9359bc91..c68cb2fcc3 100644 --- a/src/runtime/mstats.go +++ b/src/runtime/mstats.go @@ -62,12 +62,6 @@ type mstats struct { // Statistics about the garbage collector. - // next_gc is the goal gcController.heapLive for when next GC ends. - // Set to ^uint64(0) if disabled. - // - // Read and written atomically, unless the world is stopped. - next_gc uint64 - // Protected by mheap or stopping the world during GC. last_gc_unix uint64 // last gc (in unix time) pause_total_ns uint64 @@ -93,7 +87,6 @@ type mstats struct { last_gc_nanotime uint64 // last gc (monotonic time) tinyallocs uint64 // number of tiny allocations that didn't cause actual allocation; not exported to go directly - last_next_gc uint64 // next_gc for the previous GC last_heap_inuse uint64 // heap_inuse at mark termination of the previous GC // heapStats is a set of statistics @@ -460,7 +453,7 @@ func readmemstats_m(stats *MemStats) { // at a more granular level in the runtime. stats.GCSys = memstats.gcMiscSys.load() + memstats.gcWorkBufInUse + memstats.gcProgPtrScalarBitsInUse stats.OtherSys = memstats.other_sys.load() - stats.NextGC = memstats.next_gc + stats.NextGC = gcController.heapGoal stats.LastGC = memstats.last_gc_unix stats.PauseTotalNs = memstats.pause_total_ns stats.PauseNs = memstats.pause_ns |
