]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: deflake TestMorestack more
authorCherry Mui <cherryyz@google.com>
Mon, 21 Jun 2021 16:09:43 +0000 (12:09 -0400)
committerCherry Mui <cherryyz@google.com>
Mon, 21 Jun 2021 16:48:36 +0000 (16:48 +0000)
Apparently, TestMorestack is still flaky on darwin/arm64 builder
after CL 307730. Let it spend more time in copying the stack.
With this CL, on my Apple M1 machine it passes reliably in short
mode for 1000 runs, and reliably gets 250+ samples in the 5-second
interval in long mode.

May fix #46755.

Change-Id: I07b36c1cf63ad35f7820e1f8e837e29376a37b2a
Reviewed-on: https://go-review.googlesource.com/c/go/+/329869
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/pprof/pprof_test.go

index f6ae15daabf890c8bfdb3db1a6d67a12c74fd8b0..7c71d8263be8b8e7799ea856f65f0dcbdef1dcce 100644 (file)
@@ -623,7 +623,7 @@ func growstack1() {
 
 //go:noinline
 func growstack(n int) {
-       var buf [8 << 16]byte
+       var buf [8 << 18]byte
        use(buf)
        if n > 0 {
                growstack(n - 1)
@@ -631,7 +631,7 @@ func growstack(n int) {
 }
 
 //go:noinline
-func use(x [8 << 16]byte) {}
+func use(x [8 << 18]byte) {}
 
 func TestBlockProfile(t *testing.T) {
        type TestCase struct {