]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: update gctrace docs and print lastStackScan instead of max
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 24 Aug 2022 20:52:51 +0000 (20:52 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 25 Aug 2022 20:37:28 +0000 (20:37 +0000)
This change updates the gctrace docs to include stacks and globals in
the format line, and prints lastStackScan for "# MB stacks" instead of
maxStackScan, which is more accurate.

Fixes #54649.

Change-Id: Ibff2c390c9c9bf2b24b5b4e98ca346cc98d7cb2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/425366
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/extern.go
src/runtime/mgc.go

index 8fb8720e89ce0405fadc8517401185d2a6ae4ce8..531c07cf3d9887c6a958e8bf0c2c39e160505fac 100644 (file)
@@ -79,7 +79,7 @@ It is a comma-separated list of name=val pairs setting these named variables:
        error at each collection, summarizing the amount of memory collected and the
        length of the pause. The format of this line is subject to change.
        Currently, it is:
-               gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # P
+               gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # MB stacks, #MB globals, # P
        where the fields are as follows:
                gc #         the GC number, incremented at each GC
                @#s          time in seconds since program start
index 1db0984906c81275febf0731f1a031cc3196cb46..3361d48abd7f18d97d8c382bbbdc60163fcf2680 100644 (file)
@@ -1120,7 +1120,7 @@ func gcMarkTermination() {
                print(" ms cpu, ",
                        work.heap0>>20, "->", work.heap1>>20, "->", work.heap2>>20, " MB, ",
                        gcController.lastHeapGoal>>20, " MB goal, ",
-                       gcController.maxStackScan.Load()>>20, " MB stacks, ",
+                       gcController.lastStackScan.Load()>>20, " MB stacks, ",
                        gcController.globalsScan.Load()>>20, " MB globals, ",
                        work.maxprocs, " P")
                if work.userForced {