]> Cypherpunks repositories - gostls13.git/commit
runtime: consolidate gcworkdone/gcscanvalid clearing loops
authorAustin Clements <austin@google.com>
Wed, 25 Feb 2015 03:20:38 +0000 (22:20 -0500)
committerAustin Clements <austin@google.com>
Wed, 25 Feb 2015 15:46:41 +0000 (15:46 +0000)
commitb3d791c7bb89acc5bc77c4ba55f173a4d2c732c4
tree21ffc2cb55b1daf26c0770d48f7815e2f4e5db64
parent37b85971781c6474f17c6b99bf4d40765497afd3
runtime: consolidate gcworkdone/gcscanvalid clearing loops

Previously, we had three loops in the garbage collector that all
cleared the per-G GC flags.  Consolidate these into one function.
This one function is designed to work in a concurrent setting.  As a
result, it's slightly more expensive than the loops it replaces during
STW phases, but these happen at most twice per GC.

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