docs/perfetto: Be helpful and opinionated about config selection.

system.cfg should be your go-to, regardless of driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
This commit is contained in:
Emma Anholt 2025-10-10 13:34:11 -07:00 committed by Marge Bot
parent 2d739be159
commit 09e496d6c0

View file

@ -61,9 +61,10 @@ To capture a trace with Perfetto you need to take the following steps:
1. Build Perfetto from sources available at ``subprojects/perfetto`` following 1. Build Perfetto from sources available at ``subprojects/perfetto`` following
`this guide <https://perfetto.dev/docs/quickstart/linux-tracing>`__. `this guide <https://perfetto.dev/docs/quickstart/linux-tracing>`__.
2. Create a `trace config <https://perfetto.dev/docs/concepts/config>`__, which is 2. Select a `trace config <https://perfetto.dev/docs/concepts/config>`__, likely
a json formatted text file with extension ``.cfg``, or use one of the config ``src/tool/pps/cfg/system.cfg`` which does whole-system including GPU
files under the ``src/tool/pps/cfg`` directory. More examples of config files profiling for any supported GPUs). Other configs are available in that
directory for CPU-only or GPU-only tracing, and more examples of config files
can be found in ``subprojects/perfetto/test/configs``. can be found in ``subprojects/perfetto/test/configs``.
3. Change directory to ``subprojects/perfetto`` and run a 3. Change directory to ``subprojects/perfetto`` and run a
@ -106,7 +107,7 @@ the steps above :
perfetto $ ./tools/ninja -C out/linux perfetto $ ./tools/ninja -C out/linux
# Start perfetto # Start perfetto
perfetto $ CONFIG=../../src/tool/pps/cfg/gpu.cfg OUT=out/linux/ ./tools/tmux -n perfetto $ CONFIG=../../src/tool/pps/cfg/system.cfg OUT=out/linux/ ./tools/tmux -n
# In parallel from the Mesa repo, start the PPS producer # In parallel from the Mesa repo, start the PPS producer
mesa $ ./build/src/tool/pps/pps-producer mesa $ ./build/src/tool/pps/pps-producer