diff options
| author | Austin Clements <austin@google.com> | 2015-04-01 13:47:35 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2015-04-02 23:37:13 +0000 |
| commit | f244a1471d468eb35fb982cd6b4518d38bebf678 (patch) | |
| tree | 7a62a9bfad5948c5285f154f6d47fd4e28189841 /src/runtime/runtime2.go | |
| parent | 24ee948269580391dda0e3ec50136d25a5778280 (diff) | |
| download | go-f244a1471d468eb35fb982cd6b4518d38bebf678.tar.xz | |
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>
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 0d3e542882..6a2c52143f 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -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. |
