]> Cypherpunks repositories - gostls13.git/commit
runtime: move heapLive and heapScan updates into a method
authorMichael Anthony Knyszek <mknyszek@google.com>
Sun, 11 Apr 2021 18:29:03 +0000 (18:29 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 29 Oct 2021 18:35:01 +0000 (18:35 +0000)
commit8e112a7c2a814de9156f68dc8b167e4ef8c98c52
tree37fc705a72ea7aad45efff0fe3951013bbd6ee75
parent4a5d78ff8b7e777d70b18a61698b1ac07bbd623d
runtime: move heapLive and heapScan updates into a method

This change moves heapLive and heapScan updates on gcController into a
method for better testability. It's also less error-prone because code
that updates these fields needs to remember to emit traces and/or call
gcController.revise; this method now handles those cases.

For #44167.

Change-Id: I3d6f2e7abb22def27c93feacff50162b0b074da2
Reviewed-on: https://go-review.googlesource.com/c/go/+/309275
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>
src/runtime/mcache.go
src/runtime/mgcpacer.go