]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unnecessary gcworkdone resetting loop
authorAustin Clements <austin@google.com>
Wed, 25 Feb 2015 03:05:26 +0000 (22:05 -0500)
committerAustin Clements <austin@google.com>
Wed, 25 Feb 2015 15:46:21 +0000 (15:46 +0000)
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 <rsc@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgc.go

index 20709c0b54cdcd53563a60d60e51faeaad19a731..88d44b2b7572fe329a8b82b7ec54210c7ee3c677 100644 (file)
@@ -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()
        }