1
0
mirror of https://github.com/golang/go synced 2024-11-21 18:54:43 -07:00

runtime: reset parfor stats

Otherwise they sum up between GCs.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6535048
This commit is contained in:
Dmitriy Vyukov 2012-09-20 22:46:24 +04:00
parent c993ac11bc
commit d151fb9e20

View File

@ -196,6 +196,11 @@ exit:
runtime·xadd64(&desc->nprocyield, me->nprocyield); runtime·xadd64(&desc->nprocyield, me->nprocyield);
runtime·xadd64(&desc->nosyield, me->nosyield); runtime·xadd64(&desc->nosyield, me->nosyield);
runtime·xadd64(&desc->nsleep, me->nsleep); runtime·xadd64(&desc->nsleep, me->nsleep);
me->nsteal = 0;
me->nstealcnt = 0;
me->nprocyield = 0;
me->nosyield = 0;
me->nsleep = 0;
} }
// For testing from Go // For testing from Go