[Mesa-dev] [PATCH 2/5] intel: error_decode: add an option to decode all buffers
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Tue Apr 3 13:27:54 UTC 2018
The kernel reports workaround batch buffers, but we're not presenting
them currently. Also they might not be useful for debugging purely
userspace driver issues, when problems arise because of interactions
between kernel & userspace drivers, it's nice to be able to decode
them.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/intel/tools/aubinator_error_decode.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c
index 9abd05fd75a..0234c59371d 100644
--- a/src/intel/tools/aubinator_error_decode.c
+++ b/src/intel/tools/aubinator_error_decode.c
@@ -51,6 +51,7 @@
/* options */
static bool option_full_decode = true;
+static bool option_print_all_bb = false;
static bool option_print_offsets = true;
static enum { COLOR_AUTO, COLOR_ALWAYS, COLOR_NEVER } option_color;
static char *xml_path = NULL;
@@ -446,6 +447,7 @@ read_data_file(FILE *file)
{ "hw status", "HW status" },
{ "wa context", "WA context" },
{ "wa batchbuffer", "WA batch" },
+ { "NULL context", "Kernel context" },
{ "user", "user" },
{ "semaphores", "semaphores", },
{ "guc log buffer", "GuC log", },
@@ -602,7 +604,8 @@ read_data_file(FILE *file)
(unsigned) (sections[s].gtt_offset >> 32),
(unsigned) sections[s].gtt_offset);
- if (strcmp(sections[s].buffer_name, "batch buffer") == 0 ||
+ if (option_print_all_bb ||
+ strcmp(sections[s].buffer_name, "batch buffer") == 0 ||
strcmp(sections[s].buffer_name, "ring buffer") == 0 ||
strcmp(sections[s].buffer_name, "HW Context") == 0) {
gen_print_batch(&batch_ctx, sections[s].data, sections[s].count,
@@ -660,7 +663,8 @@ print_help(const char *progname, FILE *file)
" if omitted), 'always', or 'never'\n"
" --no-pager don't launch pager\n"
" --no-offsets don't print instruction offsets\n"
- " --xml=DIR load hardware xml description from directory DIR\n",
+ " --xml=DIR load hardware xml description from directory DIR\n"
+ " --all-bb print out all batchbuffers\n",
progname);
}
@@ -679,6 +683,7 @@ main(int argc, char *argv[])
{ "headers", no_argument, (int *) &option_full_decode, false },
{ "color", required_argument, NULL, 'c' },
{ "xml", required_argument, NULL, 'x' },
+ { "all-bb", no_argument, (int *) &option_print_all_bb, true },
{ NULL, 0, NULL, 0 }
};
--
2.16.3
More information about the mesa-dev
mailing list