runtime: add GODEBUG gcshrinkstackoff, gcstackbarrieroff, and gcstoptheworld variables
While we're here, update the documentation and delete variables with no effect.
Change-Id: I4df0d266dff880df61b488ed547c2870205862f0
Reviewed-on: https://go-review.googlesource.com/10790
Reviewed-by: Austin Clements <austin@google.com>
diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go
index dead22a..f5fa52d 100644
--- a/src/runtime/mgcmark.go
+++ b/src/runtime/mgcmark.go
@@ -327,6 +327,10 @@
barrierOffset = firstStackBarrierOffset
nextBarrier = sp + barrierOffset
+ if debug.gcstackbarrieroff > 0 {
+ nextBarrier = ^uintptr(0)
+ }
+
if gp.stkbarPos != 0 || len(gp.stkbar) != 0 {
// If this happens, it's probably because we
// scanned a stack twice in the same phase.