]> Cypherpunks.ru repositories - gostls13.git/commit
runtime/metrics: add tiny allocs metric
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 21 Apr 2021 23:50:58 +0000 (23:50 +0000)
committerMichael Knyszek <mknyszek@google.com>
Tue, 27 Apr 2021 13:59:22 +0000 (13:59 +0000)
commit0b9ca4d90737017fc9bb0cf125e2005c61782b79
tree6d2dccfb20e3af689b44bd4051ace48b4aa38de0
parent7d22c2181b4343b58e40962cefd52af1284b4294
runtime/metrics: add tiny allocs metric

Currently tiny allocations are not represented in either MemStats or
runtime/metrics, but they're represented in MemStats (indirectly) via
Mallocs. Add them to runtime/metrics by first merging
memstats.tinyallocs into consistentHeapStats (just for simplicity; it's
monotonic so metrics would still be self-consistent if we just read it
atomically) and then adding /gc/heap/tiny/allocs:objects to the list of
supported metrics.

Change-Id: Ie478006ab942a3e877b4a79065ffa43569722f3d
Reviewed-on: https://go-review.googlesource.com/c/go/+/312909
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/export_test.go
src/runtime/mcache.go
src/runtime/metrics.go
src/runtime/metrics/description.go
src/runtime/metrics/doc.go
src/runtime/metrics_test.go
src/runtime/mstats.go