From: Austin Clements Date: Mon, 3 Aug 2015 21:45:44 +0000 (-0400) Subject: runtime: when gcpacertrace > 0, print information about assist ratio X-Git-Tag: go1.5rc1~32 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f9dc3382ad8b3ec330b41297053e14dd199d3b5f;p=gostls13.git runtime: when gcpacertrace > 0, print information about assist ratio This was useful in debugging the mutator assist behavior for #11911, and it fits with the other gcpacertrace output. Change-Id: I1e25590bb4098223a160de796578bd11086309c7 Reviewed-on: https://go-review.googlesource.com/13046 Reviewed-by: Rick Hudson Reviewed-by: Russ Cox --- diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index c50d68e432..b1fbdc91bb 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -441,6 +441,15 @@ func (c *gcControllerState) startCycle() { // throughout the cycle. c.revise() + if debug.gcpacertrace > 0 { + print("pacer: assist ratio=", c.assistRatio, + " (scan ", memstats.heap_scan>>20, " MB in ", + work.initialHeapLive>>20, "->", + c.heapGoal>>20, " MB)", + " workers=", c.dedicatedMarkWorkersNeeded, + "+", c.fractionalMarkWorkersNeeded, "\n") + } + // Set up a timer to revise periodically c.reviseTimer.f = func(interface{}, uintptr) { gcController.revise()