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
77 lines
2.7 KiB
ReStructuredText
77 lines
2.7 KiB
ReStructuredText
u_trace GPU Performance Tracing
|
|
===============================
|
|
|
|
Mesa has its own GPU performance tracing framework which drivers may
|
|
choose to implement. ``gpu.renderstages.*`` producer for
|
|
:doc:`Perfetto Tracing <perfetto>` is based on u_trace.
|
|
|
|
It doesn't require external dependencies and much simpler to use. Though
|
|
it provides information only about GPU timings and is harder to analyze
|
|
for complex rendering.
|
|
|
|
u_trace is useful when one needs to quickly identify performance bottleneck,
|
|
or to build a tool to analyze the raw performance data.
|
|
|
|
Drivers which support u_trace:
|
|
- Intel drivers: ANV, Iris
|
|
- Adreno drivers: Freedreno, Turnip
|
|
|
|
Usage
|
|
-----
|
|
|
|
u_trace is controlled by environment variables:
|
|
|
|
.. envvar:: MESA_GPU_TRACES
|
|
|
|
controls whether u_trace is enabled and trace output
|
|
|
|
``print``
|
|
prints in a human readable text format. It should be noted that this
|
|
is mutually exclusive with ``print_json`` and both cannot be enabled
|
|
at the same time.
|
|
``print_json``
|
|
prints in JSON format, suitable for parsing. Application should
|
|
appropriately finish its rendering in order for trace's json to be
|
|
valid. For the Vulkan API, it is expected to destroy the device,
|
|
for GL it's expected to destroy the context.
|
|
``perfetto``
|
|
enables Perfetto instrumentation prior to connecting, Perfetto
|
|
traces can be collected without setting this but it may miss some
|
|
events prior to the tracing session being started.
|
|
``markers``
|
|
enables marker instrumentation, will print trace markers into
|
|
the CS which can then be viewed by dumping the CS from the driver.
|
|
|
|
- For Turnip, ``cffdump`` can be used to view the markers in
|
|
the trace.
|
|
``indirects``
|
|
enables indirect data capture for some of the tracepoints (like
|
|
indirect draw count or indirect dispatch size)
|
|
|
|
.. envvar:: MESA_GPU_TRACEFILE
|
|
|
|
specifies a file where to write the output instead of ``stdout``
|
|
|
|
.. envvar:: *_GPU_TRACEPOINT
|
|
|
|
tracepoints can be enabled or disabled using driver specific environment
|
|
variable. Most tracepoints are enabled by default. For instance
|
|
``TU_GPU_TRACEPOINT=-blit,+render_pass`` will disable the
|
|
``blit`` tracepoints and enable the ``render_pass`` tracepoints.
|
|
|
|
.. list-table::
|
|
:header-rows: 1
|
|
|
|
* - Driver
|
|
- Environment Variable
|
|
- Tracepoint Definitions
|
|
* - Freedreno
|
|
- .. envvar:: FD_GPU_TRACEPOINT
|
|
- ``src/gallium/drivers/freedreno/freedreno_tracepoints.py``
|
|
* - Turnip
|
|
- .. envvar:: TU_GPU_TRACEPOINT
|
|
- ``src/freedreno/vulkan/tu_tracepoints.py``
|
|
* - ANV
|
|
- .. envvar:: INTEL_GPU_TRACEPOINT
|
|
- ``src/intel/ds/intel_tracepoints.py``
|