Skip to content
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

Fix Rust symbols in collapse-dtrace and collapse-perf #134

Merged
merged 3 commits into from
Jul 8, 2019

Conversation

jasonrhansen
Copy link
Collaborator

This fixes partially demangled Rust function names like we did with collapse-sample.

#132 was already meant to fix #87, but it required dtrace to be run with -xmangled to leave the names mangled. You then had to pass --demangle to inferno-collapse-dtrace. This PR will give good results for Rust symbols with the default options.

@codecov
Copy link

codecov bot commented Jul 6, 2019

Codecov Report

Merging #134 into master will increase coverage by 0.29%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
+ Coverage   89.52%   89.82%   +0.29%     
==========================================
  Files          10       10              
  Lines        1146     1150       +4     
==========================================
+ Hits         1026     1033       +7     
+ Misses        120      117       -3
Impacted Files Coverage Δ
src/collapse/perf.rs 92.15% <100%> (ø) ⬆️
src/collapse/dtrace.rs 86.36% <91.66%> (+2.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07b69a1...ee752a3. Read the comment docs.

@jasonrhansen jasonrhansen changed the title Fix Rust symbols in collapse-dtrace Fix Rust symbols in collapse-dtrace and collapse-perf Jul 7, 2019
@jasonrhansen
Copy link
Collaborator Author

I did the same for collapse-perf. When I run perf on my machine, the Rust names are mostly demangled correctly, with the only exception I can see being closures. However, the Rust test profiles from upstream flamegraph have symbols that look like the partially demangled symbols from dtrace or sample. I'm guessing older versions of perf didn't demangle Rust as well?

jonhoo
jonhoo previously approved these changes Jul 7, 2019
@jasonrhansen jasonrhansen merged commit 9d7657a into jonhoo:master Jul 8, 2019
@jasonrhansen jasonrhansen deleted the dtrace-fix-rust-symbols branch July 11, 2019 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add back demangling support
2 participants