summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2019-01-15 09:04:35 -0500
committerTom St Denis <tom.stdenis@amd.com>2019-01-15 09:04:35 -0500
commit2db025121a5f867def2567c9f19ac3c8f82d1b9d (patch)
tree00145c9da6d1ddf74dd6f5d798cd01724f9ceb01
parentdbdfd765c9d5dc90000c7f0d41c0edfe8c81641c (diff)
add option to enable shader disasm in --waves even if rings are not halted
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
-rw-r--r--doc/sphinx/source/basic.rst2
-rw-r--r--doc/umr.13
-rw-r--r--src/app/main.c6
-rw-r--r--src/app/print_waves.c6
-rw-r--r--src/umr.h3
5 files changed, 15 insertions, 5 deletions
diff --git a/doc/sphinx/source/basic.rst b/doc/sphinx/source/basic.rst
index 106d539..ab69d7e 100644
--- a/doc/sphinx/source/basic.rst
+++ b/doc/sphinx/source/basic.rst
@@ -142,6 +142,8 @@ The options available are:
+-------------------+-------------------------------------------------------------------------+
| no_disasm | Disable LLVM disassembly. Used on systems with outdated llvm-dev |
+-------------------+-------------------------------------------------------------------------+
+| disasm_anyways | Enable disassembly in --waves even if rings are not halted. |
++-------------------+-------------------------------------------------------------------------+
------------------
Device Information
diff --git a/doc/umr.1 b/doc/umr.1
index 0beabdb..7a1d04b 100644
--- a/doc/umr.1
+++ b/doc/umr.1
@@ -96,7 +96,8 @@ separated strings. Options should be specified before --update or --force comma
Disable shader disassembler logic (still outputs text just doesn't use LLVM to decode). Useful
if the linked llvm-dev doesn't support the hardware being debugged. Avoids segfualts/asserts.
-
+.B disasm_anyways
+ Enable shader disassembly in --waves even if the rings aren't halted.
.SH Bank Selection
.IP "--bank, -b <se> <sh> <instance>"
diff --git a/src/app/main.c b/src/app/main.c
index 5e0aa56..2ddb60e 100644
--- a/src/app/main.c
+++ b/src/app/main.c
@@ -160,6 +160,8 @@ static void parse_options(char *str)
options.use_pci = 1;
} else if (!strcmp(option, "no_disasm")) {
options.no_disasm = 1;
+ } else if (!strcmp(option, "disasm_anyways")) {
+ options.disasm_anyways = 1;
} else {
printf("error: Unknown option [%s]\n", option);
exit(EXIT_FAILURE);
@@ -644,10 +646,10 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
} else if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
- printf("User Mode Register debugger v%s for AMDGPU devices (build: %s), Copyright (c) 2018, AMD Inc.\n"
+ printf("User Mode Register debugger v%s for AMDGPU devices (build: %s), Copyright (c) 2019, AMD Inc.\n"
"\n*** Device Selection ***\n"
"\n\t--option -O <string>[,<string>,...]\n\t\tEnable various flags: bits, bitsfull, empty_log, follow, no_follow_ib, named, many,"
- "\n\t\tuse_pci, use_colour, read_smc, quiet, no_kernel, verbose, halt_waves, disasm_early_term, no_disasm"
+ "\n\t\tuse_pci, use_colour, read_smc, quiet, no_kernel, verbose, halt_waves, disasm_early_term, no_disasm, disasm_anyways"
"\n\t--instance, -i <number>\n\t\tSelect a device instance to investigate. (default: 0)"
"\n\t\tThe instance is the directory name under /sys/kernel/debug/dri/"
"\n\t\tof the card you want to work with.\n"
diff --git a/src/app/print_waves.c b/src/app/print_waves.c
index 1223711..7538347 100644
--- a/src/app/print_waves.c
+++ b/src/app/print_waves.c
@@ -47,11 +47,15 @@ void umr_print_waves(struct umr_asic *asic)
if (asic->options.halt_waves) {
umr_sq_cmd_halt_waves(asic, UMR_SQ_CMD_HALT);
if (!umr_pm4_decode_ring_is_halted(asic, asic->options.ring_name[0] ? asic->options.ring_name : "gfx"))
- fprintf(stderr, "[WARNING]: Rings are not halted!\n");
+ fprintf(stderr, "[WARNING]: Rings are not halted! %s\n", asic->options.disasm_anyways ? "" : "Use '-O disasm_anyways' to enable disassembly without halted rings");
else
ring_halted = 1;
}
+ // always disasm if disasm_anyways is enabled
+ if (asic->options.disasm_anyways)
+ ring_halted = 1;
+
// scan a ring but don't trigger the halt/resume
// since it would have already been done
stream = umr_pm4_decode_ring(asic, asic->options.ring_name[0] ? asic->options.ring_name : "gfx", 1);
diff --git a/src/umr.h b/src/umr.h
index 84c2e9c..49da519 100644
--- a/src/umr.h
+++ b/src/umr.h
@@ -206,7 +206,8 @@ struct umr_options {
no_kernel,
no_disasm,
disasm_early_term,
- use_xgmi;
+ use_xgmi,
+ disasm_anyways;
union {
struct {