aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/runtime')
-rw-r--r--libgo/go/runtime/extern.go3
-rw-r--r--libgo/go/runtime/gc_test.go17
2 files changed, 20 insertions, 0 deletions
diff --git a/libgo/go/runtime/extern.go b/libgo/go/runtime/extern.go
index 1f6b13e..6301d01 100644
--- a/libgo/go/runtime/extern.go
+++ b/libgo/go/runtime/extern.go
@@ -47,6 +47,9 @@ It is a comma-separated list of name=val pairs setting these named variables:
that allow the garbage collector to avoid repeating a stack scan during the
mark termination phase.
+ gcstackbarrierall: setting gcstackbarrierall=1 installs stack barriers
+ in every stack frame, rather than in exponentially-spaced frames.
+
gcstoptheworld: setting gcstoptheworld=1 disables concurrent garbage collection,
making every garbage collection a stop-the-world event. Setting gcstoptheworld=2
also disables concurrent sweeping after the garbage collection finishes.
diff --git a/libgo/go/runtime/gc_test.go b/libgo/go/runtime/gc_test.go
index 262f87d..2a95cc7 100644
--- a/libgo/go/runtime/gc_test.go
+++ b/libgo/go/runtime/gc_test.go
@@ -471,4 +471,21 @@ func testAssertVar(x interface{}) error {
return nil
}
+func TestAssertE2T2Liveness(t *testing.T) {
+ *runtime.TestingAssertE2T2GC = true
+ defer func() {
+ *runtime.TestingAssertE2T2GC = false
+ }()
+
+ poisonStack()
+ testIfaceEqual(io.EOF)
+}
+
+func testIfaceEqual(x interface{}) {
+ if x == "abc" {
+ // Prevent inlining
+ panic("")
+ }
+}
+
*/