summaryrefslogtreecommitdiff
path: root/docs/u_trace.rst
diff options
context:
space:
mode:
authorMark Collins <mark@igalia.com>2022-10-19 19:29:36 +0800
committerMarge Bot <emma+marge@anholt.net>2022-11-11 13:50:56 +0000
commit18e820009d6258e91bc443b9fe7df4681e90324d (patch)
tree44347e3717be8f8990ae18a69afbf32d8fae9d19 /docs/u_trace.rst
parent044d3e53d2e92014949d2a2d79cbd13ed4aa1ed4 (diff)
downloadmesa-18e820009d6258e91bc443b9fe7df4681e90324d.tar.gz
common/utrace: Refactor and combine all envvars into `GPU_TRACES`
All environment variables involved in utrace usage were very fragmented and convoluted to decode the meaning of, this commit has simplified them down into easier to understand flags which directly indicate the resulting behavior (such as `perfetto` enabling queued logs rather than needing to set a `queued` flag) while combining them into a single envvar `GPU_TRACES` and updating existing terminology in utrace to match up with the new options. Signed-off-by: Mark Collins <mark@igalia.com> Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com> Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Ack-by: Chia-I Wu <olvaffe@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18271>
Diffstat (limited to 'docs/u_trace.rst')
-rw-r--r--docs/u_trace.rst33
1 files changed, 16 insertions, 17 deletions
diff --git a/docs/u_trace.rst b/docs/u_trace.rst
index 7ddab17736c..a6e6fa951f9 100644
--- a/docs/u_trace.rst
+++ b/docs/u_trace.rst
@@ -21,27 +21,26 @@ Usage
u_trace is controlled by environment variables:
-:envvar:`GPU_TRACE`
- if set to ``1`` enables tracing and outputs the data into ``stdout``
+:envvar:`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.
:envvar:`GPU_TRACEFILE`
specifies a file where to write the output instead of ``stdout``
-:envvar:`GPU_TRACE_FORMAT`
- controls a format of the output
-
- ``txt``
- human readable text format
- ``json``
- json format, suitable for parsing. Application should appropriately
- finish its rendering in order for trace's json to be valid.
- For Vulkan API it is expected to destroy the device, for GL it is
- expected to destroy the context.
-
-:envvar:`GPU_TRACE_INSTRUMENT`
- Meaningful only for Perfetto tracing. If set to ``1`` enables
- instrumentation of GPU commands before the tracing is enabled.
-
:envvar:`*_GPU_TRACEPOINT`
tracepoints can be enabled or disabled using driver specific environment
variable. Most tracepoints are enabled by default. For instance