]> Cypherpunks repositories - gostls13.git/commit
runtime: remove overlap in the GC CPU pause time metrics
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 8 Mar 2024 23:17:23 +0000 (23:17 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 8 Apr 2024 21:43:12 +0000 (21:43 +0000)
commitd4395ebc0c90a11a5f31fab0808baf3cb25d6ba8
tree475a11749af13860ed059d8d42e898c95237526f
parent017478a96364b474944715b175dc14b4ed34c079
runtime: remove overlap in the GC CPU pause time metrics

Currently the GC CPU pause time metrics start measuring before the STW
is complete. This results in a slightly less accurate measurement and
creates some overlap with other timings (for example, the idle time of
idle Ps) that will cause double-counting.

This CL adds a field to worldStop to track the point at which the world
actually stopped and uses that as the basis for the GC CPU pause time
metrics, basically eliminating this overlap.

Note that this will cause Ps in _Pgcstop before the world is fully
stopped to be counted as user time. A follow-up CL will fix this
discrepancy.

Change-Id: I287731f08415ffd97d327f582ddf7e5d2248a6f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/570258
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Nicolas Hillegeer <aktau@google.com>
src/runtime/mgc.go
src/runtime/proc.go