mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
intel/tools: Fix parse of '[HWCTX].replay_*' in aubinator_error_decode_xe
This hides [HWCTX].replay_offset and [HWCTX].replay_length for error decoder as those are not relevante when just reading the error decoded. From: GuC ID: 33 Name: bcs33 Class: 3 Logical mask: 0x1 Width: 1 Ref: 65 Timeout: 0 (ms) Timeslice: 1000 (us) Preempt timeout: 640000 (us) HW Context Desc: 0x03862000 HW Ring address: 0x0385e000 HW Indirect Ring State: 0x00000000 LRC Head: (memory) 0 LRC Tail: (internal) 4408, (memory) 4408 Ring start: (memory) 0x0385e000 Start seqno: (memory) -127 Seqno: (memory) -128 Timestamp: 0x00000001 Job Timestamp: 0x0000005c type char: [HWCTX].replay_offset: 0x0 type char: [HWCTX].replay_length: 0x1000 Schedule State: 0x241 Flags: 0x0 To: **** Contexts **** GuC ID: 33 Name: bcs33 Class: 3 Logical mask: 0x1 Width: 1 Ref: 65 Timeout: 0 (ms) Timeslice: 1000 (us) Preempt timeout: 640000 (us) HW Context Desc: 0x03862000 HW Ring address: 0x0385e000 HW Indirect Ring State: 0x00000000 LRC Head: (memory) 0 LRC Tail: (internal) 4408, (memory) 4408 Ring start: (memory) 0x0385e000 Start seqno: (memory) -127 Seqno: (memory) -128 Timestamp: 0x00000001 Job Timestamp: 0x0000005c Schedule State: 0x241 Flags: 0x0 Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Carlos Santa <carlos.santa@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41113>
This commit is contained in:
parent
ed729bf948
commit
965e28ff8a
4 changed files with 21 additions and 12 deletions
|
|
@ -257,6 +257,9 @@ read_xe_data_file(FILE *file,
|
|||
case XE_VM_TOPIC_TYPE_ERROR:
|
||||
printf("HWCTX not present in dump, content will be zeroed: %s\n", line);
|
||||
break;
|
||||
case XE_VM_TOPIC_TYPE_REPLAY_OFFSET:
|
||||
case XE_VM_TOPIC_TYPE_REPLAY_LENGTH:
|
||||
break;
|
||||
default:
|
||||
printf("Not expected line in HWCTX: %s", line);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,18 +61,6 @@ read_xe_data_file(FILE *dump_file, FILE *hang_dump_file, bool verbose)
|
|||
const char *value_ptr;
|
||||
char binary_name[64];
|
||||
|
||||
uint64_t u64_value;
|
||||
|
||||
if (error_decode_xe_read_u64_hexacimal_parameter(line, "[HWCTX].replay_offset", &u64_value)) {
|
||||
error_decode_xe_vm_hw_ctx_set_offset(&xe_vm, u64_value);
|
||||
break;
|
||||
}
|
||||
|
||||
if (error_decode_xe_read_u64_hexacimal_parameter(line, "[HWCTX].replay_length", &u64_value)) {
|
||||
/* replay_length is implicitly contained in size, so we don't need to save it */
|
||||
break;
|
||||
}
|
||||
|
||||
if (error_decode_xe_binary_line(line, binary_name, sizeof(binary_name), &type, &value_ptr)) {
|
||||
if (strncmp(binary_name, "HWCTX", strlen("HWCTX")) != 0)
|
||||
break;
|
||||
|
|
@ -96,6 +84,12 @@ read_xe_data_file(FILE *dump_file, FILE *hang_dump_file, bool verbose)
|
|||
case XE_VM_TOPIC_TYPE_ERROR:
|
||||
printf("HWCTX not present in dump, content will be zeroed: %s\n", line);
|
||||
break;
|
||||
case XE_VM_TOPIC_TYPE_REPLAY_OFFSET:
|
||||
error_decode_xe_vm_hw_ctx_set_offset(&xe_vm, strtoul(value_ptr, NULL, 0));
|
||||
break;
|
||||
case XE_VM_TOPIC_TYPE_REPLAY_LENGTH:
|
||||
/* replay_length is implicitly contained in size, so we don't need to save it */
|
||||
break;
|
||||
default:
|
||||
printf("Not expected line in HWCTX: %s", line);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "error_decode_lib.h"
|
||||
#include "intel/common/intel_gem.h"
|
||||
#include "util/macros.h"
|
||||
#include "util/compiler.h"
|
||||
|
||||
static const char *
|
||||
read_parameter_helper(const char *line, const char *parameter)
|
||||
|
|
@ -289,6 +290,15 @@ error_decode_xe_binary_line(const char *line, char *name, int name_len, enum xe_
|
|||
case 'l':
|
||||
*type = XE_VM_TOPIC_TYPE_LENGTH;
|
||||
break;
|
||||
case 'r':
|
||||
if (strncmp(c, "replay_offset", strlen("replay_offset")) == 0) {
|
||||
*type = XE_VM_TOPIC_TYPE_REPLAY_OFFSET;
|
||||
break;
|
||||
} else if (strncmp(c, "replay_length", strlen("replay_length")) == 0) {
|
||||
*type = XE_VM_TOPIC_TYPE_REPLAY_LENGTH;
|
||||
break;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
printf("type char: %c\n", *line);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ enum xe_vm_topic_type {
|
|||
XE_VM_TOPIC_TYPE_LENGTH,
|
||||
XE_VM_TOPIC_TYPE_DATA,
|
||||
XE_VM_TOPIC_TYPE_PROPERTY,
|
||||
XE_VM_TOPIC_TYPE_REPLAY_OFFSET,
|
||||
XE_VM_TOPIC_TYPE_REPLAY_LENGTH,
|
||||
XE_VM_TOPIC_TYPE_ERROR,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue