-
Notifications
You must be signed in to change notification settings - Fork 63
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 support for gathering perf map information in load
#34
Conversation
I've rebased this against the Jitdump work and added a commit on top which I think should make it work. I haven't tested it yet, though. I'll merge it anyway, and then you can test if it works. |
This should give us symbols when perf-<pid>.map files are used.
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.
Thank you for the contribution!
let mut split = line.splitn(3, ' '); | ||
let addr = split.next()?; | ||
let len = split.next()?; | ||
let symbol_name = split.next()?; |
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.
I've changed this to use splitn
so that we wouldn't need to glue together the last piece with spaces again. I hope perf.map files always use just a single space as a separator.
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.
Oh, yeah, the "spec" says:
Each line has the following format, fields separated with spaces:
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.
Sweet, TIL splitn
.
This adds support for reading information of
perf
mappings that can be generated by runtimes, using a very simple format. It's implemented only for theload
command, until a nice design is found for therecord
step.Unfortunately, while this correctly loads the symbols from the mapping on my machine, then when the report is displayed in Firefox Profiler's UI, the JIT symbols don't show up. Am I missing something here?