I've already explained how to capture GPU frames from Xcode in the previous two episodes. Though, I focus only on the Performance section in this one. Also I won't cover the meaning of each counter and metrics because there are lots of them, and I don't have enough time and characters here, but at least you'll have an understanding of where and what you can find.


This instrument shows what's happening at what time. So you can see here when each of your encoders runs, how much time it takes, and see which resources it uses.

You can set up filters and hide counters you aren't interested in.

Also you can select a group of counters and not be distracted by others.
NOTE: if you select an encoder or call in encoders list, it gets highlighted.

This section has a list of shaders you use with some basic statistics. It's pretty boring. Also you can find the same in Overview section.

This instrument is relatively new. It has three sections:

This instrument looks like the Heat map instrument but without heatmaps, but it's more convenient for working with code.

If you hover mouse cursor over the pie diagram, it shows more detailed statistics. That's very helpful for optimisation work (see the last chapter of the episode).

This instrument shows all counters for every draw or dispatch call. It's similar to counters in Timeline instrument, but summarised and more numbers. Use it to understand what's overloaded and what's underloaded to find ways for optimisation and to compare between calls.

If you select Performance section under a GPU call, you'll get counters for this particular call, but in more convenient shape. So I would use this instrument instead of Counters in common Performance section. But here you're not able to compare them between different calls.
There's also Pipeline Statistics, but it's too basic and not very informative after everything we had above.

If you select a shader in Bound Resources, you can see the same statistics pies, but here you can change your code.

When you did all your changes you think could improve performance of your shaders, tap the round arrow button. Xcode rerun your captured frames and profile them again. If you did it right, percentage of the line should go down (and others increase).

You can also see difference in Pipeline Statistics and difference percentage in calls hierarchy. But it can be very inaccurate, so for time profiling I recommend to use Instruments instead of GPU frame capture.