From: Austin Clements Date: Wed, 25 Feb 2015 03:05:26 +0000 (-0500) Subject: runtime: remove unnecessary gcworkdone resetting loop X-Git-Tag: go1.5beta1~1887 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=37b85971781c6474f17c6b99bf4d40765497afd3;p=gostls13.git 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 --- diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index 20709c0b54..88d44b2b75 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() }