]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime: relate GODEBUG=gctrace output to runtime/metrics
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 16 Jun 2023 18:28:22 +0000 (18:28 +0000)
committerMichael Knyszek <mknyszek@google.com>
Wed, 21 Jun 2023 15:57:28 +0000 (15:57 +0000)
There's more I could list here, but the mapping becomes more complicated
and more fragile. I think this is sufficient to start with.

Fixes #46846.

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

src/runtime/extern.go

index ac07119cb94e5ab7647948a1d761b97fa130feab..26dcf0bd52b211fa0bbb6c16615755f6e6e0426b 100644 (file)
@@ -87,7 +87,8 @@ It is a comma-separated list of name=val pairs setting these named variables:
 
        gctrace: setting gctrace=1 causes the garbage collector to emit a single line to standard
        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.
+       length of the pause. The format of this line is subject to change. Included in
+       the explanation below is also the relevant runtime/metrics metric for each field.
        Currently, it is:
                gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # MB stacks, #MB globals, # P
        where the fields are as follows:
@@ -95,11 +96,11 @@ It is a comma-separated list of name=val pairs setting these named variables:
                @#s          time in seconds since program start
                #%           percentage of time spent in GC since program start
                #+...+#      wall-clock/CPU times for the phases of the GC
-               #->#-># MB   heap size at GC start, at GC end, and live heap
-               # MB goal    goal heap size
-               # MB stacks  estimated scannable stack size
-               # MB globals scannable global size
-               # P          number of processors used
+               #->#-># MB   heap size at GC start, at GC end, and live heap, or /gc/scan/heap:bytes
+               # MB goal    goal heap size, or /gc/heap/goal:bytes
+               # MB stacks  estimated scannable stack size, or /gc/scan/stack:bytes
+               # MB globals scannable global size, or /gc/scan/globals:bytes
+               # P          number of processors used, or /sched/gomaxprocs:threads
        The phases are stop-the-world (STW) sweep termination, concurrent
        mark and scan, and STW mark termination. The CPU times
        for mark/scan are broken down in to assist time (GC performed in