-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime/pprof: incorrect locations for inlined generic functions #64641
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
gopherbot
added
the
compiler/runtime
Issues related to the Go compiler and/or runtime.
label
Dec 11, 2023
prattmic
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Dec 11, 2023
This is #64528 (comment), split into another bug. I think this also qualifies for the backport in #64609. cc @golang/runtime @cherrymui |
Change https://go.dev/cl/549135 mentions this issue: |
ezz-no
pushed a commit
to ezz-no/go-ezzno
that referenced
this issue
Feb 18, 2024
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 golang#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>
korniltsev
added a commit
to grafana/pyroscope-go
that referenced
this issue
May 21, 2024
korniltsev
added a commit
to grafana/pyroscope-go
that referenced
this issue
May 22, 2024
* fix(godeltaprof): port fix for golang/go#64528 * fix(godeltaprof): port fix for golang/go#64641 * add go 1.22 for testing
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Go version
go version devel go1.22-de5b418bea Sat Dec 2 03:15:03 2023 +0000 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
I produced a pprof profile with the following stacktrace
And
foo
andgeneric[a,b]
functions are inlined by the go compilerReproducer
More info: #64528 (comment)
What did you expect to see?
I expected to see a pprof
Location
with 3Line
for this case.What did you see instead?
Isee a pprof
Location
with 2Line
for this case. Onlyand then separate location for
I suspect this is because of this line , which checks for function names without generic shapes (
generic[...]
)go/src/runtime/pprof/proto.go
Line 564 in de5b418
The text was updated successfully, but these errors were encountered: