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

Use xctrace on macOS #192

Open
mitsuhiko opened this issue Feb 15, 2022 · 3 comments
Open

Use xctrace on macOS #192

mitsuhiko opened this issue Feb 15, 2022 · 3 comments

Comments

@mitsuhiko
Copy link

Right now flamegraph uses dtrace on macOS but this runs into some limitations:

One potential solution is to switch to xctrace and then implement a reader for the .trace / .run files. speedscope appears to have partial support for these files but I haven't been able to make it work at all yet. There is an issue from a while ago that it's not working (jlfwong/speedscope#196) but the code there might still be useful.

@djc
Copy link
Contributor

djc commented Feb 15, 2022

Sounds interesting! In the current model the reader for xctrace output would live in the inferno crate, so that's probably the best place to start.

@mitsuhiko
Copy link
Author

mitsuhiko commented Feb 15, 2022

There is an instruments to pprof tool from Google: https://github.com/google/instrumentsToPprof

Looks like this does the wrong thing. It can only deal with the text output which is not very useful.

@kraktus
Copy link
Contributor

kraktus commented Jun 12, 2022

Created an issue in the inferno repo (see above). For reference I also tried with the sample profiler which is shipped with MacOS and already supported by inferno but it seems to run into the same issues [inline frames missing].

In the mean time I can advice to use https://github.com/cmyr/cargo-instruments, which while not providing flame graph allow easy integration with Instruments

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

No branches or pull requests

3 participants