From b5481dd0a635780e8ff35cb274a9b3d85fc7f608 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 1 Mar 2016 21:30:26 -0500 Subject: [PATCH] runtime: disable gcMarkRootCheck debugging check during STW MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit gcMarkRootCheck takes ~10ns per goroutine. This is just a debugging check, so disable it (plus, if something is going to go wrong, it's more likely to go wrong during concurrent mark). We may be able to re-enable this later, or move it to after we've started the world again. (But not for 1.6.x.) For 1.6.x. Fixes #14419. name / 95%ile-time/markTerm old new delta 500kIdleGs-12 24.0ms ± 0% 18.9ms ± 6% -21.46% (p=0.000 n=15+20) Change-Id: Idb2a2b1771449de772c159ef95920d6df1090666 Reviewed-on: https://go-review.googlesource.com/20148 Reviewed-by: Rick Hudson Run-TryBot: Austin Clements TryBot-Result: Gobot Gobot --- src/runtime/mgc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index 6147454c1e..e9d420f0f0 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -1561,7 +1561,8 @@ func gcMark(start_time int64) { gcDrain(gcw, gcDrainBlock) gcw.dispose() - gcMarkRootCheck() + // TODO: Re-enable once this is cheap. + //gcMarkRootCheck() if work.full != 0 { throw("work.full != 0") } -- 2.48.1