Visualizing performance data
When it comes to the visualization of performance data, we are presented with two alternatives: either use the visualizer that shipped with the used profiler, or a standalone one.
Sampling profilers usually come with their own visualizations integrated in their GUI, as already explained. To instrument profilers, there is, as a rule, a visualization tool available; for example, look at Telemetry. Intel's ITT instrumentation API data is normally viewed in VTune Amplifier, but we can transform the data format to view it with different viewers. This is done with Intel's open source Single Event API (SEAPI) project, which supports formats such as these: Windows ETW, Android's Systrace, Google JSON trace, Qt Creator's QML profiler, open source Trace Compass, and the old and trusty GraphViz. How cool is that!
So, there are many viewers we could use, and we are somehow spoilt for choice. But lately, the Google JSON trace format has stirred quite a bit of attention, because of the built-in support for it in the ubiquitous Chrome browser! You have to open a new browser tab and type about:tracing in the omnibox, and the profiling page opens. Here, you can profile the Chrome browser itself, but also load recorder traces. Now we only need to find (or write) a set of instrumentations generating data in the prescribed JSON format and we have a custom visualizer for our data for free.
Now we have gained an overview of the available performance tools, let's do a little practical exercise to try out these tools!