]> Cypherpunks repositories - gostls13.git/commit
runtime: reset sweep stats before starting the world
authorAustin Clements <austin@google.com>
Mon, 14 Dec 2015 20:07:40 +0000 (15:07 -0500)
committerAustin Clements <austin@google.com>
Tue, 15 Dec 2015 17:58:22 +0000 (17:58 +0000)
commitff5c94538292ca66543603fc78c02a96c823c6aa
tree84bb43da0cb541377d0c3b954d639263b78b6f12
parent87d939dee835fa6eef62b00ecf3e6283a2e4f66a
runtime: reset sweep stats before starting the world

Currently we reset the sweep stats just after gcMarkTermination starts
the world and releases worldsema. However, background sweeping can
start the moment we start the world and, in fact, pause sweeping can
start the moment we release worldsema (because another GC cycle can
start up), so these need to be cleared before starting the world.

Change-Id: I95701e3de6af76bb3fbf2ee65719985bf57d20b2
Reviewed-on: https://go-review.googlesource.com/17811
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/mgc.go