aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mpagealloc.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2022-05-06 20:11:28 +0000
committerGopher Robot <gobot@golang.org>2022-09-16 16:32:20 +0000
commitb7c28f484ddbc8267273c997e1bcc83a1391b5f7 (patch)
treefe23dfabb05048822ab00faf36cc6aee2518f974 /src/runtime/mpagealloc.go
parent87eda2a782db9b7ad2ec1fd335ed6c7472aa66bc (diff)
downloadgo-b7c28f484ddbc8267273c997e1bcc83a1391b5f7.tar.xz
runtime/metrics: add CPU stats
This changes adds a breakdown for estimated CPU usage by time. These estimates are not based on real on-CPU counters, so each metric has a disclaimer explaining so. They can, however, be more reasonably compared to a total CPU time metric that this change also adds. Fixes #47216. Change-Id: I125006526be9f8e0d609200e193da5a78d9935be Reviewed-on: https://go-review.googlesource.com/c/go/+/404307 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Josh MacDonald <jmacd@lightstep.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/mpagealloc.go')
-rw-r--r--src/runtime/mpagealloc.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/runtime/mpagealloc.go b/src/runtime/mpagealloc.go
index 853d7fc9ca..a8bfc62a80 100644
--- a/src/runtime/mpagealloc.go
+++ b/src/runtime/mpagealloc.go
@@ -48,7 +48,6 @@
package runtime
import (
- "runtime/internal/atomic"
"unsafe"
)
@@ -273,15 +272,10 @@ type pageAlloc struct {
// scavenge.
index scavengeIndex
- // released is the amount of memory released this generation.
+ // released is the amount of memory released this scavenge cycle.
//
// Updated atomically.
released uintptr
-
- // scavengeAssistTime is the time spent scavenging in the last GC cycle.
- //
- // This is reset once a GC cycle ends.
- assistTime atomic.Int64
}
// mheap_.lock. This level of indirection makes it possible