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/stack1.go b/src/runtime/stack1.go
index 1965e9e..933e3d0 100644
--- a/src/runtime/stack1.go
+++ b/src/runtime/stack1.go
@@ -826,6 +826,10 @@
throw("missing stack in shrinkstack")
}
+ if debug.gcshrinkstackoff > 0 {
+ return
+ }
+
oldsize := gp.stackAlloc
newsize := oldsize / 2
if newsize < _FixedStack {