aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime1.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2015-08-26 13:54:26 -0400
committerAustin Clements <austin@google.com>2015-08-30 16:06:55 +0000
commit3bfc9df21aefe486de2c8a620a36fac178650a8c (patch)
treef6748a7e6d6021abde23332d0f977474c43a2065 /src/runtime/runtime1.go
parente2bb03f175e162cef9a6639d36483cf5e8be5306 (diff)
downloadgo-3bfc9df21aefe486de2c8a620a36fac178650a8c.tar.xz
runtime: add GODEBUG for stack barriers at every frame
Currently enabling the debugging mode where stack barriers are installed at every frame requires recompiling the runtime. However, this is potentially useful for field debugging and for runtime tests, so make this mode a GODEBUG. Updates #12238. Change-Id: I6fb128f598b19568ae723a612e099c0ed96917f5 Reviewed-on: https://go-review.googlesource.com/13947 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/runtime1.go')
-rw-r--r--src/runtime/runtime1.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go
index a50e5b618c..134c999088 100644
--- a/src/runtime/runtime1.go
+++ b/src/runtime/runtime1.go
@@ -310,6 +310,7 @@ var debug struct {
gcpacertrace int32
gcshrinkstackoff int32
gcstackbarrieroff int32
+ gcstackbarrierall int32
gcstoptheworld int32
gctrace int32
invalidptr int32
@@ -327,6 +328,7 @@ var dbgvars = []dbgVar{
{"gcpacertrace", &debug.gcpacertrace},
{"gcshrinkstackoff", &debug.gcshrinkstackoff},
{"gcstackbarrieroff", &debug.gcstackbarrieroff},
+ {"gcstackbarrierall", &debug.gcstackbarrierall},
{"gcstoptheworld", &debug.gcstoptheworld},
{"gctrace", &debug.gctrace},
{"invalidptr", &debug.invalidptr},
@@ -382,6 +384,10 @@ func parsedebugvars() {
if islibrary || isarchive {
traceback_cache |= 1
}
+
+ if debug.gcstackbarrierall > 0 {
+ firstStackBarrierOffset = 0
+ }
}
// Poor mans 64-bit division.