Skip to content

util/perf: support cpu tracepoints with perfetto

Chia-I Wu requested to merge olv/mesa:perfetto-c into main

This MR makes MESA_TRACE_* use perfetto when enabled. Because perfetto only has a C++ SDK, this adds a thin C wrapper to it.

There were ideas to use percetto or wait for an official C SDK. But neither has happened in over a year. Although I want to be clear that we should switch to an official C SDK when it is available.

I only tested perfetto. I will do an Android build to make sure I didn't break it by accident

/cc @robclark who added MESA_TRACE_* for freedreno and egl /cc @renatopereyra because this conflicts with a patch that chromeos has

Merge request reports