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

Format Support: Instruments .trace file #15

Closed
jlfwong opened this issue Apr 10, 2018 · 0 comments
Closed

Format Support: Instruments .trace file #15

jlfwong opened this issue Apr 10, 2018 · 0 comments

Comments

@jlfwong
Copy link
Owner

jlfwong commented Apr 10, 2018

It would be awesome to get data from Instruments.app into speedscope to get nice visualizations out of XCode

@jlfwong jlfwong changed the title Import from Instruments Format Support: Instruments .trace file Apr 15, 2018
jlfwong added a commit that referenced this issue May 17, 2018
#33 added support for importing from instruments indirectly via opening instruments and using the deep copy command. This PR adds support for importing `.trace` files directly, though only for time profiles specifically, and only for the highest sample count thread in the profile.

This PR adds `.trace` files from Instruments 9, and adds support for importing from either Instruments 8 and 9. The only major difference in the file format seems to be that Instruments 9 applies raw `zlib` compression generously throughout the file.

This PR also adds example `.trace` files for memory allocations, which are not supported for direct import. They use a totally different storage format for recording memory allocations, and I haven't yet figured out how that list of allocations references their corresponding callstack.

Lastly, this PR also adds examples from Instruments 7 since I happen to have a machine with an old version of Instruments. Import from Instruments 7 probably wouldn't be hard to add, but I haven't done that in this PR.

This currently only works in Chrome, and only via drag-and-drop of the files.

To test, drag the decompressed `simple-time-profile.trace` from https://github.com/jlfwong/speedscope/blob/6016d970b9d419f9ec6bf49326a0a6e9d9b26c0e/sample/profiles/Instruments/9.3.1/simple-time-profile.trace.zip onto speedscope.

The result should be this:

![image](https://user-images.githubusercontent.com/150329/40162338-8fa13502-5968-11e8-8fb3-40626e41884a.png)

Fixes #15
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

1 participant