mesa/src/gallium/tools/trace
Matti Hamalainen aeaeef661a gallium/tools: improve handling of pointer arrays
Extend the special handling of return types to also include pointer
type array list elements, so we ignore the initial "name" of the
element until we know a better type for them. This improves the type
"detection" of such pointer array elements when parsing the logs
with dump.py / tracediff.sh

Related to Mesa issue #4609

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11492>
2021-06-21 18:33:41 +00:00
..
diff_state.py gallium/tools: update trace scripts to Python 3 2021-04-10 14:00:45 +00:00
dump.py gallium/tools: update trace scripts to Python 3 2021-04-10 14:00:45 +00:00
dump_state.py gallium/tools: implement 'named' pointers option in dump.py 2021-05-07 15:48:03 +00:00
format.py gallium/tools: update trace scripts to Python 3 2021-04-10 14:00:45 +00:00
model.py gallium/tools: improve handling of pointer arrays 2021-06-21 18:33:41 +00:00
parse.py gallium/tools: implement "high-level" overview mode option in dump scripts 2021-05-07 15:48:03 +00:00
README.txt
TODO.txt
tracediff.sh gallium/tools: add option to use Meld for diffing 2021-05-07 15:48:03 +00:00

These directory contains tools for manipulating traces produced by the trace
pipe driver.


Most debug builds of gallium frontends already load the trace driver by default.
To produce a trace do

  export GALLIUM_TRACE=foo.gtrace

and run the application.  You can choose any name, but the .gtrace is
recommended to avoid confusion with the .trace produced by apitrace.


You can dump a trace by doing

  ./dump.py foo.gtrace | less


You can dump a JSON file describing the static state at any given draw call
(e.g., 12345) by
doing

  ./dump_state.py -v -c 12345 foo.gtrace > foo.json

or by specifying the n-th (e.g, 1st) draw call by doing

  ./dump_state.py -v -d 1 foo.gtrace > foo.json

The state is derived from the call sequence in the trace file, so no dynamic
(eg. rendered textures) is included.


You can compare two JSON files by doing

  ./diff_state.py foo.json boo.json | less

If you're investigating a regression in an gallium frontend, you can obtain a good
and bad trace, dump respective state in JSON, and then compare the states to
identify the problem.