Skip to content
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 function names for generics functions [1.21 backport] #64609

Closed
gopherbot opened this issue Dec 7, 2023 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link
Contributor

@prattmic requested issue #64528 to be considered for backport to the next 1.21 minor release.

Thanks for the report and fix. I think this warrants a backport.

@gopherbot Please backport to 1.21. This can create invalid profiles when using generics with no practical workaround.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Dec 7, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 7, 2023
@gopherbot gopherbot added this to the Go1.21.6 milestone Dec 7, 2023
@prattmic prattmic added the CherryPickApproved Used during the release process for point releases label Dec 13, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Dec 13, 2023
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/549535 mentions this issue: [release-branch.go1.21] runtime/pprof: fix generics function names

@gopherbot
Copy link
Contributor Author

Closed by merging ad1ec60 to release-branch.go1.21.

gopherbot pushed a commit that referenced this issue Jan 4, 2024
profileBuilder is using Frame->Function as key for checking if we already
emitted a function. However for generics functions it has dots there [...],
so sometimes for different functions with different generics types,
the profileBuilder emits wrong functions.

For #64528
For #64609

Change-Id: I8b39245e0b18f4288ce758c912c6748f87cba39a
Reviewed-on: https://go-review.googlesource.com/c/go/+/546815
Reviewed-by: Cherry Mui <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
(cherry picked from commit 20a03fc)
Reviewed-on: https://go-review.googlesource.com/c/go/+/549535
Auto-Submit: Matthew Dempsky <[email protected]>
@S-YOU
Copy link

S-YOU commented Jan 18, 2024

Currently If you pass large struct as Type, pprof show all if its definition like this. I will create an Issue too.

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants