mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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
1 changed files with 2 additions and 2 deletions
|
|
@ -623,7 +623,7 @@ func growstack1() {
|
||||||
|
|
||||||
//go:noinline
|
//go:noinline
|
||||||
func growstack(n int) {
|
func growstack(n int) {
|
||||||
var buf [8 << 16]byte
|
var buf [8 << 18]byte
|
||||||
use(buf)
|
use(buf)
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
growstack(n - 1)
|
growstack(n - 1)
|
||||||
|
|
@ -631,7 +631,7 @@ func growstack(n int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//go:noinline
|
//go:noinline
|
||||||
func use(x [8 << 16]byte) {}
|
func use(x [8 << 18]byte) {}
|
||||||
|
|
||||||
func TestBlockProfile(t *testing.T) {
|
func TestBlockProfile(t *testing.T) {
|
||||||
type TestCase struct {
|
type TestCase struct {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue