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

cmd/compile: PGO matching doesn't escape package paths #59887

Closed
prattmic opened this issue Apr 28, 2023 · 1 comment
Closed

cmd/compile: PGO matching doesn't escape package paths #59887

prattmic opened this issue Apr 28, 2023 · 1 comment
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@prattmic
Copy link
Member

Package paths that have a dot in the last component get escaped in the symbol table (and thus in profiles). e.g., in package example.com, main becomes example%2ecom.main.

When matching function names in the profile to functions in the source, we do a naive combination of package path and name (via ir.PkgFuncName), meaning we will fail to match these.

Dots in the last component of package paths are fairly rare. Most common is probably in gopkg.in/something.v1.

cc @cherrymui

@prattmic prattmic added the NeedsFix The path to resolution is known, but the work has not been done. label Apr 28, 2023
@prattmic prattmic added this to the Go1.21 milestone Apr 28, 2023
@prattmic prattmic self-assigned this Apr 28, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Apr 28, 2023
@gopherbot
Copy link

Change https://go.dev/cl/490555 mentions this issue: cmd/compile: escape package path for PGO symbol matching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants