-
Notifications
You must be signed in to change notification settings - Fork 608
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
Use llvm-symbolizer's JSON output to provide function start lines #891
Use llvm-symbolizer's JSON output to provide function start lines #891
Conversation
When analyzing a perf.data profile converted automatically via perf_to_profile via pprof -raw perf.data, no function start lines (s=0) are present in any of the locations. With google@813a5fb, this can be easily solved by using the same JSON frame data from llvm-symbolizer to provide StartLine for Function.start_line. This solves google#823.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #891 +/- ##
==========================================
+ Coverage 66.86% 66.91% +0.05%
==========================================
Files 44 44
Lines 9824 9857 +33
==========================================
+ Hits 6569 6596 +27
- Misses 2794 2820 +26
+ Partials 461 441 -20 ☔ View full report in Codecov by Sentry. |
A few CI tests failed:
|
Fixed TestPEFile windows tests that were failing and were obviously wrong. I have no idea why TestObjFile linux tests were failing in the CI tests. Let's try again please? |
Looks like the CI still failed. |
Maybe the CI setup needs to install llvm-symbolizer. |
Could be... The TestPEFile windows tests were fixed because
I wish we could solve this because it would close #823 |
binutils.go falls back to nm or binutils' addr2line if llvm-symbolizer is not available. I think this is what might be happening since perhaps the CI environment doesn't have llvm-symbolizer. I suspect we need to figure out how to install llvm-symbolizer around this line: pprof/.github/workflows/ci.yaml Line 149 in a0b0bb1
|
…tests Modify the `Fetch dependencies` step in `test-linux` job to include the installation of llvm. Add `Verify llvm-symbolizer installation` step to ensure that llvm-symbolizer is available in the CI environment for the Linux tests. This should resolve the test failures related to the missing llvm-symbolizer tool.
I have pushed changes to |
I ran the CI workflow on my fork. It is now passing all
But on
|
Enhances the CI workflow to ensure proper installation of LLVM and the `llvm-symbolizer` across both Ubuntu 20.04 and 22.04 environments. These changes address the issue of an outdated llvm-symbolizer on Ubuntu 20.04, while maintaining compatibility with Ubuntu 22.04. - Add LLVM official repository for Ubuntu 20.04 - Install LLVM 14 on Ubuntu 20.04 to ensure a recent version - Use update-alternatives to manage llvm-symbolizer versions - Maintain existing LLVM 14 for Ubuntu 22.04
Last commit addresses the issue of an outdated |
Sorry it's taking me a while to review this. I've been staring at the code on and off, I'm just not a fan of how much this complicates the CI configuration with this code to get llvm/clang installed. But I guess there is no better way so I should just bite the bullet and LGTM. |
Not a problem at all. Take the time you need to give it a thorough review. Yeah, the additional complexity is sad but it is required... Ubuntu 20.04 provides LLVM 10's pprof/internal/binutils/binutils_test.go Line 336 in a0b0bb1
|
When analyzing a perf.data profile converted automatically via perf_to_profile via pprof -raw perf.data, no function start lines (s=0) are present in any of the locations. With 813a5fb, this can be easily solved by using the same JSON frame data from llvm-symbolizer to provide StartLine for Function.start_line. This solves #823.