panvk: add more utrace tracepoints
What does this MR do and why?
This is a follow-up to utrace support to add more GPU tracepoints. Here is an example for vkcube-wayland. The GPU tracepoints appear in Misc Global Tracks
.
Most of the tracepoints map to high-level api calls:
- meta ops
- render passes
- dispatches
- barriers
There is also sync_wait
that maps to low-level cs_sync{32,64}_wait
. But I only use it for wait_finish_tiling
at the moment.
We can always add/remove/modify tracepoints as we see fit. There can also be CPU tracepoints or debug markers, but they are for the future.
--
Perfetto can be tedious to set up. There is Perfetto Tracing. And here is how I use it:
- follow build instructions to cross-compile perfetto for the target device
- or simply get prebuilt from
https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v48.1/linux-arm64/tracebox
- or simply get prebuilt from
- scp
tracebox
to the target device and open 2 terminals- one runs
./tracebox traced
, the daemon - another runs
sudo ./tracebox traced_probes --reset-ftrace
, to collect ftrace events
- one runs
- run
vkcube
in another terminal withMESA_GPU_TRACES=perfetto
- run
./tracebox perfetto -c system.cfg --txt -o out.trace
to start tracing- system.cfg is shipped with mesa
- it stops tracing after 7s automatically, or upon Ctrl-C
- navigate to https://ui.perfetto.dev/ to view the trace