]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: fix goroutine leak profile tests for noopt
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 13 Nov 2025 00:09:05 +0000 (00:09 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 13 Nov 2025 15:23:03 +0000 (07:23 -0800)
commit625d8e9b9cd7ede188a8856c5ac88791333baa63
tree7a4ddc4fdfa8a5aa0c0bc9880ae4489c02ffce83
parent4684a26c2606eae5ec3d06d17f66a66374315a47
runtime/pprof: fix goroutine leak profile tests for noopt

The goroutine leak profile tests currently rely on a function being
inlined, which results in a slightly different representation in the
pprof proto. This function is not inlined on the noopt builder.

Disable inlining of the one function which could be inlined to align but
the regular and noopt builder versions of this test. We're not
interested in testing the inlining functionality of profiles with this
test, we care about certain stack frames appearing in a certain order.

This also simplifies a bunch of the checking in the test.

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-noopt
Change-Id: I28902cc4c9fae32d1e3fa41b93b00c3be4d6074a
Reviewed-on: https://go-review.googlesource.com/c/go/+/720100
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/pprof/pprof_test.go