Skip to content

Importing from Instruments.app

Jamie Wong edited this page May 23, 2020 · 2 revisions

There are two supported methods for importing from Instruments.app: importing Time Profiler .trace files, and importing via deep copy.

Importing via deep copy

After recording either a Time Profiler profile or an Allocations profile, select the root row of the table view. Then select "Edit -> Deep Copy" from the main menu.

Deep copy menu item

This will copy a tree containing aggregate statistics about the profile onto your clipboard. Now visit https://www.speedscope.app and paste. Note that this method only carries aggregate statistics, rather than time-ordered samples, so you the time ordered view and the left heavy view will look similar.

Importing Time Profiler .trace files

WARNING: At time of writing, import of Instruments 10 files seems to be buggy at best. See https://github.com/jlfwong/speedscope/issues/196

To record a time profile using Instruments.app, first select "Time Profiler" from the list of profiling templates.

Instruments.app profiling template selection screen

Select the target you want to profile.

Selecting the profile

Click the record button.

Clicking record

When you're done recording, hit the stop button.

Clicking stop

Then save the profile as a .trace file.

Saving a profile

If you drag and drop the resulting file into speedscope, it should load the profile.

At time of writing, selecting the file via "browse" or running speedscope /path/to/Instruments.trace won't work. See https://github.com/jlfwong/speedscope/issues/97