-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fall back to symbol+offset when calculating source lines if mod+pc fails
When using perf to profile jni code in java with help of a map agent [1], the output of perf script contain raw $pc values for dynamically loaded libraries. This does not get translated into source lines when using the 'stackcollapse-perf.pl --source --inline' command. But perf script also produces symbol+offset in outputs, so this commit adds a fallback that, if normal means fail, calculates address in mod by getting the symbol address with nm and adding to the offset, and retries with source line calculation for this address, producing a valid result. [1] https://github.com/jvm-profiling-tools/perf-map-agent
- Loading branch information
1 parent
7b0ca27
commit 6b3d9bf
Showing
1 changed file
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters