]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unused _GCsweep state
authorAustin Clements <austin@google.com>
Thu, 25 Jun 2015 16:24:44 +0000 (12:24 -0400)
committerAustin Clements <austin@google.com>
Mon, 29 Jun 2015 15:33:31 +0000 (15:33 +0000)
We don't use this state. _GCoff means we're sweeping in the
background. This makes it clear in the next commit that _GCoff and
only _GCoff means sweeping.

Change-Id: I416324a829ba0be3794a6cf3cf1655114cb6e47c
Reviewed-on: https://go-review.googlesource.com/11501
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/mgc.go

index 6289cb57a2ffd8e53d913ca495fe39de0bccacac..c0318a0a626cc0fcdc487881d8161b1fa15676b9 100644 (file)
 // 11. GC preempts P's one-by-one taking partial wbufs and marks all unmarked yet
 //        reachable objects.
 // 12. When GC completes a full cycle over P's and discovers no new grey
-//         objects, (which means all reachable objects are marked) set phase = GCsweep.
+//         objects, (which means all reachable objects are marked) set phase = GCoff.
 // 13. Wait for all P's to acknowledge phase change.
 // 14. Now malloc allocates white (but sweeps spans before use).
 //         Write barrier becomes nop.
 // 15. GC does background sweeping, see description below.
-// 16. When sweeping is complete set phase to GCoff.
-// 17. When sufficient allocation has taken place replay the sequence starting at 0 above,
+// 16. When sufficient allocation has taken place replay the sequence starting at 0 above,
 //         see discussion of GC rate below.
 
 // Changing phases.
@@ -241,12 +240,11 @@ var gcBlackenEnabled uint32
 var gcBlackenPromptly bool
 
 const (
-       _GCoff             = iota // GC not running, write barrier disabled
+       _GCoff             = iota // GC not running; sweeping in background, write barrier disabled
        _GCstw                    // unused state
        _GCscan                   // GC collecting roots into workbufs, write barrier ENABLED
        _GCmark                   // GC marking from workbufs, write barrier ENABLED
        _GCmarktermination        // GC mark termination: allocate black, P's help GC, write barrier ENABLED
-       _GCsweep                  // GC mark completed; sweeping in background, write barrier disabled
 )
 
 //go:nosplit