diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2022-04-01 22:34:45 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2022-05-03 15:12:38 +0000 |
| commit | 375d696ddf102d64729a21f931f4e1d8bfa82ce5 (patch) | |
| tree | 7a74ef9c84e95daba67d3a3cc1c6545e46e42a74 /src/runtime/export_test.go | |
| parent | d36d5bd3c1906d3581ac4ac0d8a1a0eb4b5b16c4 (diff) | |
| download | go-375d696ddf102d64729a21f931f4e1d8bfa82ce5.tar.xz | |
runtime: move inconsistent memstats into gcController
Fundamentally, all of these memstats exist to serve the runtime in
managing memory. For the sake of simpler testing, couple these stats
more tightly with the GC.
This CL was mostly done automatically. The fields had to be moved
manually, but the references to the fields were updated via
gofmt -w -r 'memstats.<field> -> gcController.<field>' *.go
For #48409.
Change-Id: Ic036e875c98138d9a11e1c35f8c61b784c376134
Reviewed-on: https://go-review.googlesource.com/c/go/+/397678
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index 4025ac3743..0e64b87317 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -1046,7 +1046,7 @@ func FreePageAlloc(pp *PageAlloc) { // sysUsed adds to p.sysStat and memstats.mappedReady no matter what // (and in anger should actually be accounted for), and there's no other // way to figure out how much we actually mapped. - memstats.mappedReady.Add(-int64(p.summaryMappedReady)) + gcController.mappedReady.Add(-int64(p.summaryMappedReady)) testSysStat.add(-int64(p.summaryMappedReady)) // Free the mapped space for chunks. |
