inferno
inferno copied to clipboard
`xctrace` support
~~Basically working. Required to be done:~~
- [x]
quick-xmlupdate #332 - [x] Add more logs and tests
- [x] Documentation and changelog update
Fixes #246
xctrace is a tracer used internally by Apple Instruments. It generates a .trace folder containing a bunch of files in an unknown binary format. People have reverse engineerd it but it's internal format changed after XCode 12.
There's a xctrace export command, which can convert .trace into a readable XML file. However, it's output can't be used to generate flamegraphs until XCode 14.3, which introduces VM address and symbol name to the XML output.
In this PR, I added a stack collapser for XML files generated by xctrace export, making it possible to convert Instruments or xctrace‘s output into flamegraph.
Codecov Report
Patch coverage is 84.70% of modified lines.
| Files Changed | Coverage |
|---|---|
| src/collapse/mod.rs | ø |
| src/collapse/xctrace.rs | 84.58% |
| src/collapse/guess.rs | 100.00% |
:loudspeaker: Thoughts on this report? Let us know!.
Hey, I was going to start working on integrating this only to see the work was already done! Thanks @ldm0!
I can help add the documentation if needed. Also not sure if this feature need to be tied to the quick-xml update?
I can help add the documentation if needed. Also not sure if this feature need to be tied to the
quick-xmlupdate?
Thanks! I've written some documentation already, will submit it tomorrow. I think introducing multiple versions of the same dependency is bad(in terms of artifact size and complexity), so I'm waiting for the quick-xml update.
BTW, I've forked flamegraph with this inferno branch and you can try it: cargo install --git https://github.com/ldm0/flamegraph --branch xctrace, I replaced the default tracer(dtrace) with xctrace on macOS. (Make sure you get an XCode>=14.3 though)