diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2021-04-01 16:31:29 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2021-04-14 03:14:51 +0000 |
commit | 728e3dc6f9c900654d94642135e0dcfe2f7bb645 (patch) | |
tree | decdd3f95a18f192961b4aea40e218ce1c9428f9 /src/runtime/mgc.go | |
parent | eb433ed5a2ab13567cd5d7f0413308174750d5dd (diff) | |
download | go-728e3dc6f9c900654d94642135e0dcfe2f7bb645.tar.gz go-728e3dc6f9c900654d94642135e0dcfe2f7bb645.zip |
runtime: make gcSetTriggerRatio a method of gcControllerState
gcSetTriggerRatio's purpose is to set a bunch of downstream values when
we choose to commit to a new trigger ratio computed by the gcController.
Now that almost all the inputs it uses to compute the downstream values
are in gcControllerState anyway, make it a method of gcControllerState.
For #44167.
Change-Id: I1b7ea709e8378566f812ae3450ab169d7fb66aea
Reviewed-on: https://go-review.googlesource.com/c/go/+/306599
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/mgc.go')
-rw-r--r-- | src/runtime/mgc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index ff0618a053..f523d42812 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -982,7 +982,7 @@ func gcMarkTermination(nextTriggerRatio float64) { memstats.last_heap_inuse = memstats.heap_inuse // Update GC trigger and pacing for the next cycle. - gcSetTriggerRatio(nextTriggerRatio) + gcController.commit(nextTriggerRatio) // Update timing memstats now := nanotime() |