aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2015-05-11 18:53:49 -0400
committerAustin Clements <austin@google.com>2015-05-12 19:58:08 +0000
commit350fd548b3313cfe47cf3c02cd01cfccb931211d (patch)
treef1507b1bdb6b0588783177379de1b8ba7698a94b /src/runtime
parent5ed4bb6db111d31a2c8625fe122de0ed7f1a9cbd (diff)
downloadgo-350fd548b3313cfe47cf3c02cd01cfccb931211d.tar.xz
runtime: don't run runq tests on the system stack
Running these tests on the system stack is problematic because they allocate Ps, which are large enough to overflow the system stack if they are stack-allocated. It used to be necessary to run these tests on the system stack because they were written in C, but since this is no longer the case, we can fix this problem by simply not running the tests on the system stack. This also means we no longer need the hack in one of these tests that forces the allocated Ps to escape to the heap, so eliminate that as well. Change-Id: I9064f5f8fd7f7b446ff39a22a70b172cfcb2dc57 Reviewed-on: https://go-review.googlesource.com/9923 Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/export_test.go4
-rw-r--r--src/runtime/proc1.go4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go
index 817622abd0..2f8df78e13 100644
--- a/src/runtime/export_test.go
+++ b/src/runtime/export_test.go
@@ -83,10 +83,10 @@ func GCMask(x interface{}) (ret []byte) {
}
func RunSchedLocalQueueTest() {
- systemstack(testSchedLocalQueue)
+ testSchedLocalQueue()
}
func RunSchedLocalQueueStealTest() {
- systemstack(testSchedLocalQueueSteal)
+ testSchedLocalQueueSteal()
}
var StringHash = stringHash
diff --git a/src/runtime/proc1.go b/src/runtime/proc1.go
index 01c46a85ec..2fe1551952 100644
--- a/src/runtime/proc1.go
+++ b/src/runtime/proc1.go
@@ -3539,13 +3539,9 @@ func testSchedLocalQueue() {
}
}
-var pSink *p
-
func testSchedLocalQueueSteal() {
p1 := new(p)
p2 := new(p)
- pSink = p1 // Force to heap, too large to allocate on system stack ("G0 stack")
- pSink = p2 // Force to heap, too large to allocate on system stack ("G0 stack")
gs := make([]g, len(p1.runq))
for i := 0; i < len(p1.runq); i++ {
for j := 0; j < i; j++ {