aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/runtime/metrics.go6
-rw-r--r--src/runtime/metrics/description.go5
-rw-r--r--src/runtime/metrics/doc.go3
3 files changed, 14 insertions, 0 deletions
diff --git a/src/runtime/metrics.go b/src/runtime/metrics.go
index da189565c5..356d21ae7d 100644
--- a/src/runtime/metrics.go
+++ b/src/runtime/metrics.go
@@ -195,6 +195,12 @@ func initMetrics() {
out.scalar = gcController.globalsScan.Load()
},
},
+ "/gc/scan/heap:bytes": {
+ compute: func(in *statAggregate, out *metricValue) {
+ out.kind = metricKindUint64
+ out.scalar = gcController.heapScan.Load()
+ },
+ },
"/gc/heap/allocs-by-size:bytes": {
deps: makeStatDepSet(heapStatsDep),
compute: func(in *statAggregate, out *metricValue) {
diff --git a/src/runtime/metrics/description.go b/src/runtime/metrics/description.go
index 8275148fdd..ac6f437075 100644
--- a/src/runtime/metrics/description.go
+++ b/src/runtime/metrics/description.go
@@ -300,6 +300,11 @@ var allDesc = []Description{
Kind: KindUint64,
},
{
+ Name: "/gc/scan/heap:bytes",
+ Description: "The total amount of heap space that is scannable.",
+ Kind: KindUint64,
+ },
+ {
Name: "/gc/scan/stack:bytes",
Description: "The number of bytes of stack that were scanned last GC cycle.",
Kind: KindUint64,
diff --git a/src/runtime/metrics/doc.go b/src/runtime/metrics/doc.go
index 0392e76677..15fba2b5d4 100644
--- a/src/runtime/metrics/doc.go
+++ b/src/runtime/metrics/doc.go
@@ -219,6 +219,9 @@ Below is the full list of supported metrics, ordered lexicographically.
/gc/scan/globals:bytes
The total amount of global variable space that is scannable.
+ /gc/scan/heap:bytes
+ The total amount of heap space that is scannable.
+
/gc/scan/stack:bytes
The number of bytes of stack that were scanned last GC cycle.