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

Port stackcollapse-recursive.pl #291

Merged
merged 6 commits into from Aug 20, 2023
Merged

Conversation

jacksonriley
Copy link
Contributor

@jacksonriley jacksonriley commented May 6, 2023

Original script - https://github.com/brendangregg/FlameGraph/blob/master/stackcollapse-recursive.pl

I was a bit unsure whether this fit better as a standalone script or as an option to the existing collapse scripts, but for a first pass I ported this as a standalone script, as

  • this seemed closer to the function of the original code
  • this allows the script to be run on some pre-collapsed input, rather than requiring you to go back and pass in a --squash-recursive option to one of the other collapse scripts after you decide you want to collapse recursive calls.

I can definitely also see benefits to adding this as an option to the existing collapse scripts, so I'm happy to switch to that if you'd prefer!

Fixes #275.

@jacksonriley jacksonriley changed the title Port [stackcollapse-recursive.pl](https://github.com/brendangregg/FlameGraph/blob/master/stackcollapse-recursive.pl) Port stackcollapse-recursive.pl May 6, 2023
Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Two minor nits, and then I think we're ready to land this 🎉

src/collapse/recursive.rs Outdated Show resolved Hide resolved
src/collapse/recursive.rs Outdated Show resolved Hide resolved
src/collapse/recursive.rs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 6, 2023

Codecov Report

Patch coverage: 88.97% and project coverage change: -0.07% ⚠️

Comparison is base (a497e3e) 91.08% compared to head (ba6d131) 91.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #291      +/-   ##
==========================================
- Coverage   91.08%   91.01%   -0.07%     
==========================================
  Files          18       19       +1     
  Lines        4249     4385     +136     
==========================================
+ Hits         3870     3991     +121     
- Misses        379      394      +15     
Files Changed Coverage Δ
src/collapse/mod.rs 96.96% <ø> (ø)
src/collapse/recursive.rs 88.97% <88.97%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jonhoo jonhoo merged commit aa2a17b into jonhoo:main Aug 20, 2023
12 of 16 checks passed
@jonhoo
Copy link
Owner

jonhoo commented Aug 20, 2023

Released in 0.11.16 🎉

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.

Support for simplifying recursive function calls as stackcollapse perl scripts
2 participants