Commit d7cedc4b authored by Austin Clements's avatar Austin Clements

runtime: perform gcMarkRootCheck during STW in checkmark mode

gcMarkRootCheck is too expensive to do during mark termination.
However, since it's a useful check and it complements checkmark mode
nicely, enable it during mark termination is checkmark is enabled.

Change-Id: Icd9039e85e6e9d22747454441b50f1cdd1412202
Reviewed-on: https://go-review.googlesource.com/20663Reviewed-by: default avatarRick Hudson <rlh@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent a96884cf
...@@ -1554,8 +1554,11 @@ func gcMark(start_time int64) { ...@@ -1554,8 +1554,11 @@ func gcMark(start_time int64) {
gcDrain(gcw, gcDrainBlock) gcDrain(gcw, gcDrainBlock)
gcw.dispose() gcw.dispose()
// TODO: Re-enable once this is cheap. if debug.gccheckmark > 0 {
//gcMarkRootCheck() // This is expensive when there's a large number of
// Gs, so only do it if checkmark is also enabled.
gcMarkRootCheck()
}
if work.full != 0 { if work.full != 0 {
throw("work.full != 0") throw("work.full != 0")
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment