aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mgc.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2021-04-08 22:01:13 +0000
committerMichael Knyszek <mknyszek@google.com>2021-10-21 18:20:19 +0000
commitf99e40aac023d818e8c2594e5b8c075786087132 (patch)
treeb190f9eb7f50b05819cc09f24d0b2b1a8c209dcb /src/runtime/mgc.go
parent6508fdad9d83d6792314639c9819a15894728682 (diff)
downloadgo-f99e40aac023d818e8c2594e5b8c075786087132.tar.gz
go-f99e40aac023d818e8c2594e5b8c075786087132.zip
runtime: detangle gcPaceScavenger from the pacer
Currently gcPaceScavenger is called by gcControllerState.commit, but it manipulates global state which precludes testing. This change detangles the two. Change-Id: I10d8ebdf426d99ba49d2f2cb4fb64891e9fd6091 Reviewed-on: https://go-review.googlesource.com/c/go/+/309272 Reviewed-by: Michael Pratt <mpratt@google.com> Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/runtime/mgc.go')
-rw-r--r--src/runtime/mgc.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go
index f937287281..429b907322 100644
--- a/src/runtime/mgc.go
+++ b/src/runtime/mgc.go
@@ -971,6 +971,7 @@ func gcMarkTermination(nextTriggerRatio float64) {
// Update GC trigger and pacing for the next cycle.
gcController.commit(nextTriggerRatio)
+ gcPaceScavenger(gcController.heapGoal, gcController.lastHeapGoal)
// Update timing memstats
now := nanotime()