aux/trace: add GALLIUM_TRACE_TRIGGER mode

similar to amd/radv driver debug modes for sqtt, this specifies a filename
which is checked on every flush(PIPE_FLUSH_END_OF_FRAME); when it exists,
the next frame (and only that frame) is captured into the trace

to use, specify a file with the env var, run your app, and 'touch /path/to/file'
when you want to capture a trace

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10058>
This commit is contained in:
Mike Blumenkrantz
2021-04-06 09:40:21 -04:00
committed by Marge Bot
parent ad88e2f959
commit 193c02e0cf
4 changed files with 58 additions and 1 deletions
+7
View File
@@ -32,6 +32,13 @@ specified file. Paths may be relative or absolute; relative paths are relative
to the working directory. For example, setting it to "trace.xml" will cause
the trace to be written to a file of the same name in the working directory.
.. envvar:: GALLIUM_TRACE_TRIGGER <string> ("")
If set while :ref:`trace` is active, this variable specifies a filename to monitor.
Once the file exists (e.g., from the user running 'touch /path/to/file'), a single
frame will be recorded into the trace output.
Paths may be relative or absolute; relative paths are relative to the working directory.
.. envvar:: GALLIUM_DUMP_CPU <bool> (false)
Dump information about the current CPU that the driver is running on.