Files
TheRock/third-party/sysdeps/linux/amd-mesa/mesa-fork/docs/gpuvis.rst
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

67 lines
2.1 KiB
ReStructuredText

Gpuvis Tracing Annotations
==========================
`Gpuvis <https://github.com/mikesart/gpuvis>`__ is a tool to visualize ftrace
traces, with support for most GPU drivers to show GPU activity.
Mesa can emit trace markers to be displayed in Gpuvis, which is useful for
figuring out why e.g. stalls are happening.
Run on Linux
------------
Any traces can be made with trace-cmd. The Gpuvis repository contains
`scripts <https://github.com/mikesart/gpuvis/tree/master/sample>`__ for
configuring the markers needed for GPU events. To start tracing:
.. code-block:: sh
sh trace-cmd-setup.sh && sh trace-cmd-start-tracing.sh
# Start your game etc. Then to capture a trace
sh trace-cmd-capture.sh
# and to finally stop
sh trace-cmd-stop-tracing.sh
The resulting trace file can be opened with Gpuvis.
Run on SteamOS
--------------
SteamOS includes a script (`gpu-trace <https://github.com/lostgoat/gpu-trace>`__)
to capture traces.
.. code-block:: sh
sudo gpu-trace
# Press Ctrl+C to stop capture and open report in gpuvis
Note that on SteamOS gpuvis is actually not installed by default, but the
script does write a gpu-trace.zip file in the current working directory. To
open it you'll want to do the following on your development machine:
.. code-block:: sh
scp sd-host:gpu-trace.zip ./
unzip gpu-trace.zip
./trace-cmd convert -i *.dat -o converted.dat --compression none --file-version 6
gpuvis *.json converted.dat
The main advantage of the gpu-trace script is that it has an integration with
perf, so Gpuvis can also visualize perf samples in the timeline. Note that the
perf file is preprocessed before being put into the zip file, so the trace is
portable between machines.
Annotations in Steam games
--------------------------
Steam games are run in a container, and need the environment variable
PRESSURE_VESSEL_DEVEL=1 to set up the tracing filesystem so the trace marker
can be written. This can e.g. be done by going to the game properties in
Steam and setting the command line to
.. code-block:: sh
PRESSURE_VESSEL_DEVEL=1 %command%
Then you can run the game as usual, and the driver will write trace annotations.