Skip to content

Draft: Tracy instrumentation

Ivan Molodetskikh requested to merge YaLTeR/mutter:tracy into main

This MR adds Tracy support to Mutter and extends the profiling instrumentation. It builds on top of !3417 (merged) which has all the new non-Tracy-specific profiling instrumentation.

Inspecting a Tracy recording.

The main thing Tracy collects are spans, which are the same as Sysprof marks, so I simply added Tracy span emission into the existing COGL_TRACE macros. In general, all Tracy calls are hidden behind the cogl-trace.h machinery and not exposed directly.

The benefit of Tracy over Sysprof is a different timeline view that is very well suited to inspecting what happens within a particular frame. Tracy also has lots of useful statistical tools, and support for plots and GPU spans.

Submitting this as a draft to get some general feedback, especially around the GPU span instrumentation which is more involved.

The easiest way to try this out on Fedora is my COPR which has Tracy itself, plus a previous version of this MR on top of GNOME 45, plus Tracy instrumentation of several dependencies (glib, GJS, Shell) making the Shell session profiles much more useful. See the COPR page, and the tracy.md documentation I wrote in the last commit, for usage instructions.

Edited by Ivan Molodetskikh

Merge request reports