]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: hide map runtime frames from heap profiles
authorMichael Pratt <mpratt@google.com>
Thu, 9 Jan 2025 17:22:53 +0000 (12:22 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 9 Jan 2025 21:59:08 +0000 (13:59 -0800)
commitd0c9142ce3b6fac83dadcc76ecfb85311431e743
treefeeee3cede527a0a6c79fa2ba698d3a49caac6a4
parentc7c4420ae4b0e82b26606776fbd0e4fea97d37c9
runtime/pprof: hide map runtime frames from heap profiles

Heap profiles hide "runtime" frames like runtime.mapassign. This broke
in 1.24 because the map implementation moved to internal/runtime/maps,
and runtime/pprof only considered literal "runtime." when looking for
runtime frames.

It would be nice to use cmd/internal/objabi.PkgSpecial to find runtime
packages, but that is hidden away in cmd.

Fixes #71174.

Change-Id: I6a6a636cb42aa17539e47da16854bd3fd8cb1bfe
Reviewed-on: https://go-review.googlesource.com/c/go/+/641775
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/pprof/pprof.go
src/runtime/pprof/protomem.go
src/runtime/pprof/protomem_test.go