Skip to content

Commit 56bdf7f

Browse files
mknyszekgopherbot
authored andcommitted
runtime: update gctrace docs and print lastStackScan instead of max
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 <[email protected]> Auto-Submit: Michael Knyszek <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
1 parent f64f12f commit 56bdf7f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/runtime/extern.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ It is a comma-separated list of name=val pairs setting these named variables:
7979
error at each collection, summarizing the amount of memory collected and the
8080
length of the pause. The format of this line is subject to change.
8181
Currently, it is:
82-
gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # P
82+
gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # MB stacks, #MB globals, # P
8383
where the fields are as follows:
8484
gc # the GC number, incremented at each GC
8585
@#s time in seconds since program start

src/runtime/mgc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ func gcMarkTermination() {
11201120
print(" ms cpu, ",
11211121
work.heap0>>20, "->", work.heap1>>20, "->", work.heap2>>20, " MB, ",
11221122
gcController.lastHeapGoal>>20, " MB goal, ",
1123-
gcController.maxStackScan.Load()>>20, " MB stacks, ",
1123+
gcController.lastStackScan.Load()>>20, " MB stacks, ",
11241124
gcController.globalsScan.Load()>>20, " MB globals, ",
11251125
work.maxprocs, " P")
11261126
if work.userForced {

0 commit comments

Comments
 (0)