mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: add cumulative GC CPU % to gctrace line
This tracks both total CPU time used by GC and the total time available to all Ps since the beginning of the program and uses this to derive a cumulative CPU usage percent for the gctrace line. Change-Id: Ica85372b8dd45f7621909b325d5ac713a9b0d015 Reviewed-on: https://go-review.googlesource.com/8350 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
24ee948269
commit
f244a1471d
3 changed files with 35 additions and 7 deletions
|
|
@ -421,6 +421,9 @@ type schedt struct {
|
|||
lastpoll uint64
|
||||
|
||||
profilehz int32 // cpu profiling rate
|
||||
|
||||
procresizetime int64 // nanotime() of last change to gomaxprocs
|
||||
totaltime int64 // ∫gomaxprocs dt up to procresizetime
|
||||
}
|
||||
|
||||
// The m->locked word holds two pieces of state counting active calls to LockOSThread/lockOSThread.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue