mirror of
https://github.com/golang/go
synced 2024-11-11 19:21:37 -07:00
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 <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
ced0fdbad0
commit
2e542c3c06
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user