mirror of
https://github.com/golang/go
synced 2024-09-29 01:34:32 -06:00
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 <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
78df00dd6f
commit
24617a068c
@ -212,6 +212,7 @@ func (l *gcCPULimiterState) updateLocked(now int64) {
|
||||
fallthrough
|
||||
case limiterEventIdle:
|
||||
idleTime += duration
|
||||
sched.idleTime.Add(duration)
|
||||
case limiterEventMarkAssist:
|
||||
fallthrough
|
||||
case limiterEventScavengeAssist:
|
||||
|
Loading…
Reference in New Issue
Block a user