-
Notifications
You must be signed in to change notification settings - Fork 129
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 inferno-collapse-ghcprof to handle GHC's prof files #300
Conversation
0c63239
to
1f1d104
Compare
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.
Left some comments, but I think this is pretty close! One thing we should definitely check out is GHC's -pj
flag for JSON output if that can make this job easier (and more robust).
Also, could you run one of these all the way to an SVG just to give it a visual correctness check as well (if you haven't already that is).
I think I've addressed all the comments with updates except for the utf8 one. |
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
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.
Nice! We're almost there. Just one more bit.
No need to commit the SVGs — just wanted a sanity-check that things looked reasonable.
src/collapse/ghcprof.rs
Outdated
// - BUT it has a max width of 9 whilst its values can exceed (but are always space separted) | ||
// "%time %alloc %time %alloc ticks bytes" | ||
let source = match self.opt.source { | ||
Source::PercentTime => l.find("%time").unwrap(), |
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.
This still panics, but should return an error instead (like the other two now do).
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.
it's one of those cases where we "know" it's there since otherwise we couldn't be in the block because we just matched it as part of START_LINE
. I've added a nice return error anyway and made clippy happy
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.
Ah, in that case you can use expect
instead and give the rationale!
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.
okay swapped it
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, looks like you may need to merge from main too |
let-else are 1.65
rebased |
Oh, sorry, one very last thing — can you add an entry to |
Message added to changelog |
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!
Released in 0.11.17 🎉 |
Because this format is not directly rust related I'm not sure if you would prefer this be part of this repo or be a separate crate listing
Basically GHC (the Haskell compiler) has its own format for profiling traces and this adds collapsing for it.
https://downloads.haskell.org/ghc/latest/docs/users_guide/profiling.html