Mesa (master): gallium/ddebug: new pipe for hang detection and driver state dumping (v2)

Marek Olšák mareko at kemper.freedesktop.org
Wed Aug 26 17:25:36 UTC 2015


Module: Mesa
Branch: master
Commit: 525921ed51176255474c73adacfc6801a7bf2783
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=525921ed51176255474c73adacfc6801a7bf2783

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Jul  4 14:10:21 2015 +0200

gallium/ddebug: new pipe for hang detection and driver state dumping (v2)

v2: lots of improvements

This is like identity or trace, but simpler. It doesn't wrap most states.

Run with:
  GALLIUM_DDEBUG=1000 [executable]
where "executable" is the app and "1000" is in miliseconds, meaning that
the context will be considered hung if a fence fails to signal in 1000 ms.

If that happens, all shaders, context states, bound resources, draw
parameters, and driver debug information (if any) will be dumped into:
  /home/$username/dd_dumps/$processname_$pid_$index.

Note that the context is flushed after every draw/clear/copy/blit operation
and then waited for to find the exact call that hangs.

You can also do:
  GALLIUM_DDEBUG=always
to do the dumping after every draw/clear/copy/blit operation without
flushing and waiting.

Examples of driver states that can be dumped are:
- Hardware status registers saying which hw block is busy (hung).
- Disassembled shaders in a human-readable form.
- The last submitted command buffer in a human-readable form.

v2: drop pipe-loader changes, drop SConscript
    rename dd.h -> dd_pipe.h

Acked-by: Christian König <christian.koenig at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>

---

 configure.ac                                       |    1 +
 src/gallium/Makefile.am                            |    1 +
 .../auxiliary/target-helpers/inline_debug_helper.h |    8 +
 src/gallium/drivers/ddebug/Makefile.am             |    9 +
 src/gallium/drivers/ddebug/Makefile.sources        |    6 +
 src/gallium/drivers/ddebug/dd_context.c            |  771 +++++++++++++++++++
 src/gallium/drivers/ddebug/dd_draw.c               |  807 ++++++++++++++++++++
 src/gallium/drivers/ddebug/dd_pipe.h               |  141 ++++
 src/gallium/drivers/ddebug/dd_public.h             |   36 +
 src/gallium/drivers/ddebug/dd_screen.c             |  353 +++++++++
 src/gallium/targets/dri/Makefile.am                |    2 +
 11 files changed, 2135 insertions(+)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=525921ed51176255474c73adacfc6801a7bf2783



More information about the mesa-commit mailing list