[Mesa-dev] [PATCH 00/16] gallium, ddebug, radeonsi: cleaner logging of IBs and other info
Nicolai Hähnle
nhaehnle at gmail.com
Wed Aug 16 11:05:30 UTC 2017
Hi all,
GALLIUM_DDEBUG is a useful facility for understanding what the driver
actually does, but it can occasionally be hard to follow the IB dumps,
especially when you want to understand a sequence of draws that are
all placed in the same IB, without submits in between.
The goal of this series is to properly interleave the IB chunks that
are emitted for each draw with the corresponding state. On top, this
should be done in a way that doesn't slow down pipelined hang detection
too much.
This series refactors the logging done by ddebug, somewhat putting it
on its head. Rather than asking the driver to provide information at
specific times, the ddebug module passes a u_log_context to the driver.
The driver then appends opaque "chunks" to the log as it does its thing.
The ddebug module will cut of "pages" of chunks associated with Gallium
level draw calls, and request actual formatting (printing) of those
pages only when needed.
There are probably still some aspects to be tweaked over time, but
I found this mode quite useful for GALLIUM_DDEBUG="always noflush"
of some smaller tests, and I can see it being quite useful for pipelined
hang detection as well -- although that needs some separate fixes and
improvements, e.g. because those fence writes that ddebug does actually
end up as SDMA writes (aka useless) nowadays! Anyway, I feel the
current state is already an improvement.
Please review!
Thanks,
Nicolai
--
src/amd/common/ac_debug.c | 37 +-
src/amd/common/ac_debug.h | 3 +
src/gallium/auxiliary/Makefile.sources | 2 +
src/gallium/auxiliary/util/u_log.c | 234 ++++++++
src/gallium/auxiliary/util/u_log.h | 100 ++++
src/gallium/drivers/ddebug/dd_context.c | 9 +
src/gallium/drivers/ddebug/dd_draw.c | 95 +---
src/gallium/drivers/ddebug/dd_pipe.h | 5 +-
.../drivers/radeon/r600_pipe_common.h | 5 +-
src/gallium/drivers/radeon/r600_texture.c | 41 +-
src/gallium/drivers/radeonsi/si_blit.c | 13 +
src/gallium/drivers/radeonsi/si_compute.c | 30 +-
src/gallium/drivers/radeonsi/si_compute.h | 14 +
src/gallium/drivers/radeonsi/si_debug.c | 493 ++++++++++++-----
src/gallium/drivers/radeonsi/si_hw_context.c | 64 ++-
src/gallium/drivers/radeonsi/si_pipe.c | 19 +-
src/gallium/drivers/radeonsi/si_pipe.h | 33 +-
src/gallium/drivers/radeonsi/si_shader.h | 14 +
src/gallium/drivers/radeonsi/si_state_draw.c | 31 +-
.../drivers/radeonsi/si_state_shaders.c | 17 +-
src/gallium/include/pipe/p_context.h | 14 +
src/gallium/include/pipe/p_defines.h | 3 -
22 files changed, 978 insertions(+), 298 deletions(-)
More information about the mesa-dev
mailing list