From: Cherry Mui Date: Mon, 21 Jun 2021 16:09:43 +0000 (-0400) Subject: runtime/pprof: deflake TestMorestack more X-Git-Tag: go1.17rc1~70 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2e542c3c061950dbaf202645fb00bcf4aa5861a0;p=gostls13.git runtime/pprof: deflake TestMorestack more 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 Run-TryBot: Cherry Mui TryBot-Result: Go Bot Reviewed-by: Michael Pratt --- diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go index f6ae15daab..7c71d8263b 100644 --- a/src/runtime/pprof/pprof_test.go +++ b/src/runtime/pprof/pprof_test.go @@ -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 {