trace script improvement ideas
I've written !10093 (merged) which provides per-frame dumping like renderdoc, doing ad hoc struct dumps so that all the necessary info is available even if states were created before the dump is triggered. This makes it much, much easier to compare and analyze specific call sequences at the gallium level and to compare differences in frames when performance issues or rendering defects are observed.
Currently, the scripts provided for analyzing trace dumps are sort of limited in usefulness; you can either view the entire trace, or you can diff an entire trace, but that's it, which makes the trace infrastructure itself somewhat less useful.
Traces contain a lot of info, and parsing through the significant portions of a trace is challenging because of that. Some ideas for making pertinent information more readily available:
- Add an option for ignoring pointers in diffs; pointers always differ between frames, so this is more or less useless in a diff.
- An alternative (but more complex)) option for this would be to tag each pointer of each type (e.g., resources are a type, surfaces are a type, blend states are a type, ...) and then convert them to a naming format like
surface_1
,surface_2
based on when they're first seen in the trace, as this should generally match up and be useful.
- An alternative (but more complex)) option for this would be to tag each pointer of each type (e.g., resources are a type, surfaces are a type, blend states are a type, ...) and then convert them to a naming format like
- Add a "high-level" overview mode for both
dump.py
andtracediff.sh
which shows nothing but the method names. This would make it immediately obvious what was happening in a frame. - Add a "diff-only" mode for
tracediff.sh
which is the high-level mode, but then expands each call to show only the params which differ. Again, this would improve visibility for info that actually matters.