From 37b85971781c6474f17c6b99bf4d40765497afd3 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 24 Feb 2015 22:05:26 -0500 Subject: [PATCH] runtime: remove unnecessary gcworkdone resetting loop The loop in gcMark is redundant with the gcworkdone resetting performed by markroot, which called a few lines later in gcMark. Change-Id: Ie0a826a614ecfa79e6e6b866e8d1de40ba515856 Reviewed-on: https://go-review.googlesource.com/5880 Reviewed-by: Russ Cox Reviewed-by: Rick Hudson --- src/runtime/mgc.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index 20709c0b54c..88d44b2b757 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -455,12 +455,6 @@ func gcMark(start_time int64) { work.ndone = 0 work.nproc = uint32(gcprocs()) - // World is stopped so allglen will not change. - for i := uintptr(0); i < allglen; i++ { - gp := allgs[i] - gp.gcworkdone = false // set to true in gcphasework - } - if trace.enabled { traceGCScanStart() }