Skip to content

Commit 2e542c3

Browse files
committed
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 <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
1 parent ced0fdb commit 2e542c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/pprof/pprof_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,15 +623,15 @@ func growstack1() {
623623

624624
//go:noinline
625625
func growstack(n int) {
626-
var buf [8 << 16]byte
626+
var buf [8 << 18]byte
627627
use(buf)
628628
if n > 0 {
629629
growstack(n - 1)
630630
}
631631
}
632632

633633
//go:noinline
634-
func use(x [8 << 16]byte) {}
634+
func use(x [8 << 18]byte) {}
635635

636636
func TestBlockProfile(t *testing.T) {
637637
type TestCase struct {

0 commit comments

Comments
 (0)