Skip to content
Snippets Groups Projects
Commit a63afe47 authored by Felix Geisendörfer's avatar Felix Geisendörfer Committed by Gopher Robot
Browse files

runtime/metrics: add /gc/scan/globals:bytes

For #56857

Change-Id: I748fd2a33ee76d9a83ea42f2ebf6d9edda243301
Reviewed-on: https://go-review.googlesource.com/c/go/+/497320


Run-TryBot: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
Reviewed-by: default avatarDavid Chase <drchase@google.com>
Reviewed-by: default avatarMichael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
parent 8b51eb51
Branches
Tags nfs-provisioner-v2.2.0-k8s1.12
No related merge requests found
...@@ -189,6 +189,12 @@ func initMetrics() { ...@@ -189,6 +189,12 @@ func initMetrics() {
out.scalar = in.sysStats.gcCyclesDone out.scalar = in.sysStats.gcCyclesDone
}, },
}, },
"/gc/scan/globals:bytes": {
compute: func(in *statAggregate, out *metricValue) {
out.kind = metricKindUint64
out.scalar = gcController.globalsScan.Load()
},
},
"/gc/heap/allocs-by-size:bytes": { "/gc/heap/allocs-by-size:bytes": {
deps: makeStatDepSet(heapStatsDep), deps: makeStatDepSet(heapStatsDep),
compute: func(in *statAggregate, out *metricValue) { compute: func(in *statAggregate, out *metricValue) {
......
...@@ -294,6 +294,11 @@ var allDesc = []Description{ ...@@ -294,6 +294,11 @@ var allDesc = []Description{
Kind: KindFloat64Histogram, Kind: KindFloat64Histogram,
Cumulative: true, Cumulative: true,
}, },
{
Name: "/gc/scan/globals:bytes",
Description: "The total amount of global variable space that is scannable.",
Kind: KindUint64,
},
{ {
Name: "/gc/scan/stack:bytes", Name: "/gc/scan/stack:bytes",
Description: "The number of bytes of stack that were scanned last GC cycle.", Description: "The number of bytes of stack that were scanned last GC cycle.",
......
...@@ -216,6 +216,9 @@ Below is the full list of supported metrics, ordered lexicographically. ...@@ -216,6 +216,9 @@ Below is the full list of supported metrics, ordered lexicographically.
Distribution of individual GC-related stop-the-world pause Distribution of individual GC-related stop-the-world pause
latencies. Bucket counts increase monotonically. latencies. Bucket counts increase monotonically.
/gc/scan/globals:bytes
The total amount of global variable space that is scannable.
/gc/scan/stack:bytes /gc/scan/stack:bytes
The number of bytes of stack that were scanned last GC cycle. The number of bytes of stack that were scanned last GC cycle.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment