diff options
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 15f10f087e..329d1b2624 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -5262,6 +5262,7 @@ func newproc1(fn *funcval, callergp *g, callerpc uintptr, parked bool, waitreaso racereleasemergeg(newg, unsafe.Pointer(&labelSync)) } } + pp.goroutinesCreated++ releasem(mp) return newg @@ -5841,6 +5842,8 @@ func (pp *p) destroy() { pp.gcAssistTime = 0 gcCleanups.queued += pp.cleanupsQueued pp.cleanupsQueued = 0 + sched.goroutinesCreated.Add(int64(pp.goroutinesCreated)) + pp.goroutinesCreated = 0 pp.xRegs.free() pp.status = _Pdead } |
