]> Cypherpunks repositories - gostls13.git/commit
runtime: break out GC pacer into its own file
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 31 Mar 2021 21:47:41 +0000 (21:47 +0000)
committerMichael Knyszek <mknyszek@google.com>
Tue, 13 Apr 2021 22:06:56 +0000 (22:06 +0000)
commitf5f76471074c4f475404fb2488846b38f57f9720
treef342d9c7841593fd2bd92b2704329ca46fbc58b2
parent9913f821e23e9e26b84ce2b96698140116ee342b
runtime: break out GC pacer into its own file

This change breaks out the GC pacer into its own file so that it'll be
easier to see the full implementation and change it. It also suggests an
obvious place to put tests (mgcpacer_test.go).

This includes all of gcControllerState, gcSetTriggerRatio, anything
related to GOGC, and all related globals and constants.

This is almost a clean move, except that globals and constants are
formatted into blocks instead of having a separate "var" declaration for
each one.

For #44167.

Change-Id: I85aa84ce85c6cfbe0b33e8a3c91cbe9dc41de8cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/306596
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/mgc.go
src/runtime/mgcpacer.go [new file with mode: 0644]