[Mesa-dev] [PATCH 00/15] radv: GPU hangs should now be easier to detect
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Sep 12 10:35:37 UTC 2017
Hi,
Currently, it's not easy to debug a GPU hang with radv because only a
trace file is generated (cf. RADV_TRACE_FILE). That file contains all
packets and commands emitted into the IB, that's useful but definitely
not enough. For example, the active shaders at the moment of the hang
are not dumped, same for the descriptors, etc.
This series tries to fix the problem by dumping a bunch information
when a hang is detected (or when a VM fault occured). It generates
a full hang report which contains the active shaders (disassembly only
for now), the annotated shaders using UMR (if found in your path), the
descriptors and more.
Here's a real hang report generated by this series:
https://people.freedesktop.org/~hakzsam/radv_hang_report_example
Please review, Thanks!
Samuel Pitoiset (15):
radv: add a comment that describes the trace BO layout
radv: save the bound pipeline pointers into the trace BO
radv: add radv_cmd_buffer_after_draw() helper function
radv: add debug flags for syncing shaders after every draw call
radv: dump the active shaders when a hang occured
radv: add radv_shader_dump_stats() helper
radv: dump shader stats when a hang occured
radv/winsys: add a read_registers() callback
radv: dump some status MMIO registers when a hang occured
radeonsi: move si_get_wave_info() to AMD common code
radv: dump annotated shaders using UMR
radv: save all descriptor pointers into the trace BO
radv: dump descriptors when a hang occured
radv: dump last 60 lines of dmesg when a hang occured
radv: dump the list of enabled options when a hang occured
src/amd/common/ac_debug.c | 76 +++
src/amd/common/ac_debug.h | 18 +
src/amd/vulkan/radv_cmd_buffer.c | 124 ++++-
src/amd/vulkan/radv_debug.c | 540 +++++++++++++++++++++-
src/amd/vulkan/radv_debug.h | 1 +
src/amd/vulkan/radv_device.c | 15 +
src/amd/vulkan/radv_pipeline.c | 64 +--
src/amd/vulkan/radv_private.h | 7 +
src/amd/vulkan/radv_radeon_winsys.h | 3 +
src/amd/vulkan/radv_shader.c | 70 +++
src/amd/vulkan/radv_shader.h | 6 +
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c | 11 +
src/gallium/drivers/radeonsi/si_debug.c | 96 +---
13 files changed, 857 insertions(+), 174 deletions(-)
--
2.14.1
More information about the mesa-dev
mailing list