]> Cypherpunks repositories - gostls13.git/commit
runtime: eliminate work.markrootdone and second root marking pass
authorAustin Clements <austin@google.com>
Thu, 16 Aug 2018 16:32:46 +0000 (12:32 -0400)
committerAustin Clements <austin@google.com>
Tue, 2 Oct 2018 20:35:37 +0000 (20:35 +0000)
commit550dfc8ae1651eb954274045e31f8ef2e95f6c6c
treec8121c86c2cca3f6478c76887feaca7121005afc
parent873bd47dfb34ba4416d4df30180905250b91f137
runtime: eliminate work.markrootdone and second root marking pass

Before STW and concurrent GC were unified, there could be either one
or two root marking passes per GC cycle. There were several tasks we
had to make sure happened once and only once (whether that was at the
beginning of concurrent mark for concurrent GC or during mark
termination for STW GC). We kept track of this in work.markrootdone.

Now that STW and concurrent GC both use the concurrent marking code
and we've eliminated all work done by the second root marking pass, we
only ever need a single root marking pass. Hence, we can eliminate
work.markrootdone and all of the code that's conditional on it.

Updates #26903.

Change-Id: I654a0f5e21b9322279525560a31e64b8d33b790f
Reviewed-on: https://go-review.googlesource.com/c/134784
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgc.go
src/runtime/mgcmark.go