From d151fb9e20a808e91cd0c2fbfbe59a1515070705 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Thu, 20 Sep 2012 22:46:24 +0400 Subject: [PATCH] runtime: reset parfor stats Otherwise they sum up between GCs. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6535048 --- src/pkg/runtime/parfor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pkg/runtime/parfor.c b/src/pkg/runtime/parfor.c index 7ebbaac4cdd..36dd65852fa 100644 --- a/src/pkg/runtime/parfor.c +++ b/src/pkg/runtime/parfor.c @@ -196,6 +196,11 @@ exit: runtime·xadd64(&desc->nprocyield, me->nprocyield); runtime·xadd64(&desc->nosyield, me->nosyield); 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