From: Nicolai Hähnle <nicolai.haeh...@amd.com>

This will give us meaningful wave information in the case of a hang where
shaders are still running in an infinite loop.

Note that we call umr multiple times for different sections of the ddebug
hang dump, and so the wave information will not necessarily match up
between sections.
---
 src/amd/common/ac_debug.c               | 2 +-
 src/gallium/drivers/radeonsi/si_debug.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c
index 7f43437aa95..3b15398a2a2 100644
--- a/src/amd/common/ac_debug.c
+++ b/src/amd/common/ac_debug.c
@@ -754,21 +754,21 @@ static int compare_wave(const void *p1, const void *p2)
 
        return 0;
 }
 
 /* Return wave information. "waves" should be a large enough array. */
 unsigned ac_get_wave_info(struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP])
 {
        char line[2000];
        unsigned num_waves = 0;
 
-       FILE *p = popen("umr -wa", "r");
+       FILE *p = popen("umr -O halt_waves -wa", "r");
        if (!p)
                return 0;
 
        if (!fgets(line, sizeof(line), p) ||
            strncmp(line, "SE", 2) != 0) {
                pclose(p);
                return 0;
        }
 
        while (fgets(line, sizeof(line), p)) {
diff --git a/src/gallium/drivers/radeonsi/si_debug.c 
b/src/gallium/drivers/radeonsi/si_debug.c
index 385ce3906db..b24d5e705f5 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -975,22 +975,22 @@ static void si_dump_debug_state(struct pipe_context *ctx, 
FILE *f,
 {
        struct si_context *sctx = (struct si_context*)ctx;
 
        if (sctx->b.log)
                u_log_flush(sctx->b.log);
 
        if (flags & PIPE_DUMP_DEVICE_STATUS_REGISTERS) {
                si_dump_debug_registers(sctx, f);
 
                si_dump_annotated_shaders(sctx, f);
-               si_dump_command("Active waves (raw data)", "umr -wa | column 
-t", f);
-               si_dump_command("Wave information", "umr -O bits -wa", f);
+               si_dump_command("Active waves (raw data)", "umr -O halt_waves 
-wa | column -t", f);
+               si_dump_command("Wave information", "umr -O halt_waves,bits 
-wa", f);
        }
 }
 
 void si_log_draw_state(struct si_context *sctx, struct u_log_context *log)
 {
        if (!log)
                return;
 
        si_dump_framebuffer(sctx, log);
 
-- 
2.11.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to