]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: fix inlined generics locations
authorTolya Korniltsev <korniltsev.anatoly@gmail.com>
Tue, 12 Dec 2023 15:24:34 +0000 (22:24 +0700)
committerMichael Pratt <mpratt@google.com>
Wed, 13 Dec 2023 20:40:52 +0000 (20:40 +0000)
commitd95e25e83c922aa63fcb1f596d6bdf1786789edb
tree307b081e699e0926c6ee1c96638941cb765b05ba
parentcc5ccd71ef6df461fed01a91c18c5adde10ae2c8
runtime/pprof: fix inlined generics locations

When generic function[a,b] is inlined to the same generic function[b,a]
with different types (not recursion) it is expected to get a pprof with
a single Location with two functions. However due to incorrect check
for generics names using runtime.Frame.Function, the profileBuilder
assumes it is a recursion and emits separate Location.

This change fixes the recursion check for generics functions by using
runtime_expandFinalInlineFrame

Fixes #64641

Change-Id: I3f58818f08ee322b281daa377fa421555ad328c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/549135
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/pprof/proto.go
src/runtime/pprof/protomem_test.go