Mesa (main): intel/tools/aubinator_error_decode: tag hanging instruction
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 21 08:31:03 UTC 2021
Module: Mesa
Branch: main
Commit: b6843d990b3ca6910954093b7837a8fd437cbc18
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6843d990b3ca6910954093b7837a8fd437cbc18
Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date: Mon Jul 19 18:29:21 2021 +0200
intel/tools/aubinator_error_decode: tag hanging instruction
Signed-off-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11957>
---
src/intel/common/intel_batch_decoder.c | 5 +++--
src/intel/common/intel_decoder.h | 1 +
src/intel/tools/aubinator_error_decode.c | 6 ++++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/intel/common/intel_batch_decoder.c b/src/intel/common/intel_batch_decoder.c
index f7abd28397a..709e3c2374f 100644
--- a/src/intel/common/intel_batch_decoder.c
+++ b/src/intel/common/intel_batch_decoder.c
@@ -1289,8 +1289,9 @@ intel_print_batch(struct intel_batch_decode_ctx *ctx,
reset_color = "";
}
- fprintf(ctx->fp, "%s0x%08"PRIx64": 0x%08x: %-80s%s\n",
- color, offset, p[0], inst_name, reset_color);
+ fprintf(ctx->fp, "%s0x%08"PRIx64"%s: 0x%08x: %-80s%s\n", color, offset,
+ ctx->acthd && offset == ctx->acthd ? " (ACTHD)" : "", p[0],
+ inst_name, reset_color);
if (ctx->flags & INTEL_BATCH_DECODE_FULL) {
ctx_print_group(ctx, inst, offset, p);
diff --git a/src/intel/common/intel_decoder.h b/src/intel/common/intel_decoder.h
index 2283a1d05c6..20458073a4e 100644
--- a/src/intel/common/intel_decoder.h
+++ b/src/intel/common/intel_decoder.h
@@ -252,6 +252,7 @@ struct intel_batch_decode_ctx {
enum drm_i915_gem_engine_class engine;
int n_batch_buffer_start;
+ uint64_t acthd;
};
void intel_batch_decode_ctx_init(struct intel_batch_decode_ctx *ctx,
diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c
index eadeeb3af17..a10265c9b23 100644
--- a/src/intel/tools/aubinator_error_decode.c
+++ b/src/intel/tools/aubinator_error_decode.c
@@ -418,6 +418,7 @@ read_data_file(FILE *file)
bool ring_wraps = false;
char *ring_name = NULL;
struct intel_device_info devinfo;
+ uint64_t acthd = 0;
while (getline(&line, &line_size, file) > 0) {
char *new_ring_name = NULL;
@@ -538,6 +539,10 @@ read_data_file(FILE *file)
ring_name), reg);
}
+ matched = sscanf(line, " ACTHD: 0x%08x %08x\n", ®, ®2);
+ if (matched == 2)
+ acthd = ((uint64_t)reg << 32) | reg2;
+
matched = sscanf(line, " PGTBL_ER: 0x%08x\n", ®);
if (matched == 1 && reg)
print_pgtbl_err(reg, &devinfo);
@@ -659,6 +664,7 @@ read_data_file(FILE *file)
struct intel_batch_decode_ctx batch_ctx;
intel_batch_decode_ctx_init(&batch_ctx, &devinfo, stdout, batch_flags,
xml_path, get_intel_batch_bo, NULL, NULL);
+ batch_ctx.acthd = acthd;
for (int s = 0; s < num_sections; s++) {
More information about the mesa-commit
mailing list