-
Notifications
You must be signed in to change notification settings - Fork 607
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
Add gsym support #636
base: main
Are you sure you want to change the base?
Add gsym support #636
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
I'd like to add tests for that, but for this to work in CI, we would need to
|
Per our CONTRIBUTING.md, two of the main things that are considered when deciding if a PR for a new feature should be accepted:
These things are important for us to consider because we have relatively limited capacity to support and maintain the I do not currently know if this feature is sufficiently broadly useful to accept into |
Thanks for the quick feedback!
Sure, I am completely in line with that.
Given the emphasis that's put on the fact that addr2line is very slow (which it is, the binutils addr2line even more so than the LLVM version), it seems this should be pretty useful for many users of pprof? Note that while
An alternative might be to provide a mock |
@nolanmar511 Have you got any suggestion on how to proceed? |
I would have some hesitations about the maintainability of a test case which uses a mock for I'm also a bit concerned about adding support in pprof for something which is not yet released. I have a couple of reasons for this: first, I have a lower confidence that something which is unreleased will have a stable API (and, if the API isn't stable, that increases maintenance costs); next, for something which is unreleased, it'll be harder to understand if it has a broad audience (so, it's not as easy to know if support for @aalexand would likely have a more definite opinion here. |
I think it would be a reasonable course of action to defer merging this PR until the next LLVM major version which should be due in October. I can implement tests that will only run with a custom-built LLVM until LLVM 13 is available. Until then, we can use a patched version. I'd rather avoid the need for a permanent fork though.
Not sure how to determine this. Part of this is kind of a hen-and-egg problem: As long as there's insufficient tool support for using GSYM files, there's no point in using |
@@ -3,6 +3,7 @@ on: | |||
push: | |||
branches: | |||
- master | |||
- add-gsym-support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be a part of this PR.
@sfc-gh-sgiesecke it would be nice if llvm-addr2line would transparently support the gsym format instead. It doesn't look right that tools like pprof need to dispatch on different file formats supported by LLVM. |
I agree it would be nice to add support for GSYM to llvm-addr2line. I don't know why GSYM lookup wasn't added there in the first place. Probably having a single tool for handling GSYM files vs. having a single tool for address lookup is a hard choice. But I guess that wouldn't resolve the need for some explicit support in pprof, since I can't imagine this would be supported transparently. The GSYM data isn't part of the binary, but always a separate file, and there's no debug-link mechanism like for DWARF. I guess it would be considered a breaking change to change the default to first look for a GSYM file before possible falling back to DWARF. So if pprof were to support that, it would need to be able to pass some extra command line option to addr2line. I am not 100% sure, but I don't think this is configurable right now? |
This seems similar to how *.dwp files are supported. There could be a default of looking up next to the binary or something. In any case, this is something that many tools will need to solve and I don't think the tools should deal with this. |
Fixes #632