-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support parsing existing jemalloc profile /proc/id/maps section #7
Comments
Can you explain the use case a bit? Are you looking to extract the profile from outside of the process? What would you expect the API to look like? cc @umanwizard |
If I understand correctly, @Rjected wants to use the library to parse unrelated jeheap files from other processes and transform them to pprof, which requires a way to provide the mappings. I think we can support this, I'll look into it later this week (Friday) |
Yep that's exactly it! although I'm attempting to analyze them in the firefox profiler instead of pprof, like this: |
I did some thinking on what would be required to support this (for linux only for now):
|
Right now
parse_jeheap
usesMAPPINGS
to populate mapping information:rust-jemalloc-pprof/pure/src/lib.rs
Lines 318 to 322 in 07bc78a
When using
parse_jeheap
on an existing file, this still collects mappings for the running process:rust-jemalloc-pprof/pure/src/linux.rs
Lines 44 to 152 in 07bc78a
When profiling is enabled and disabled inline, this makes sense.
However, for an existing jemalloc profile, this is counter-intuitive, because the returned mappings are not actually generated from the heap file.
For example, if this method is run on an existing heap file, the returned mappings will be different each time, and do not actually match what exists in the file.
It would be great to support parsing the
/proc/id/maps
output from the.heap
file.The text was updated successfully, but these errors were encountered: