From: Michael Anthony Knyszek Date: Thu, 18 May 2023 17:19:37 +0000 (+0000) Subject: runtime: flush idle time to sched.idleTime on limiter event consumption X-Git-Tag: go1.21rc1~421 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=24617a068c55d0ee7ef56d1b9fb951ee1e75f67d;p=gostls13.git runtime: flush idle time to sched.idleTime on limiter event consumption This was an oversight, which might cause accounted-for idle time to be lost. Noticed this while working on #60276. Change-Id: Ic743785d6dc82555e660f2c9b6aaa9dedef56ed8 Reviewed-on: https://go-review.googlesource.com/c/go/+/496117 Run-TryBot: Michael Knyszek TryBot-Result: Gopher Robot Reviewed-by: Michael Pratt --- diff --git a/src/runtime/mgclimit.go b/src/runtime/mgclimit.go index 51c5506eee..ef3cc081ce 100644 --- a/src/runtime/mgclimit.go +++ b/src/runtime/mgclimit.go @@ -212,6 +212,7 @@ func (l *gcCPULimiterState) updateLocked(now int64) { fallthrough case limiterEventIdle: idleTime += duration + sched.idleTime.Add(duration) case limiterEventMarkAssist: fallthrough case limiterEventScavengeAssist: