From d5b40b6ac261c987244ba0131c272b0b7ebc25cf Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 5 Jun 2015 11:51:49 -0400 Subject: 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 --- src/runtime/stack1.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/runtime/stack1.go') diff --git a/src/runtime/stack1.go b/src/runtime/stack1.go index 1965e9e262..933e3d0b28 100644 --- a/src/runtime/stack1.go +++ b/src/runtime/stack1.go @@ -826,6 +826,10 @@ func shrinkstack(gp *g) { throw("missing stack in shrinkstack") } + if debug.gcshrinkstackoff > 0 { + return + } + oldsize := gp.stackAlloc newsize := oldsize / 2 if newsize < _FixedStack { -- cgit v1.3-5-g9baa