From b7c28f484ddbc8267273c997e1bcc83a1391b5f7 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Fri, 6 May 2022 20:11:28 +0000 Subject: 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 Reviewed-by: Josh MacDonald Auto-Submit: Michael Knyszek Reviewed-by: David Chase Run-TryBot: Michael Knyszek TryBot-Result: Gopher Robot --- src/runtime/mpagealloc.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/runtime/mpagealloc.go') 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 -- cgit v1.3