mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
intel/tools/error_decode: Detect and split error dump file parsing by KMD
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
This commit is contained in:
parent
1b07bb12d3
commit
341d0fcbf6
4 changed files with 38 additions and 3 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include <getopt.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#include "aubinator_error_decode_xe.h"
|
||||
#include "compiler/brw_compiler.h"
|
||||
#include "decoder/intel_decoder.h"
|
||||
#include "dev/intel_debug.h"
|
||||
|
|
@ -45,6 +46,8 @@
|
|||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
#define XE_KMD_ERROR_DUMP_IDENTIFIER "**** Xe Device Coredump ****"
|
||||
|
||||
/* options */
|
||||
|
||||
static bool option_full_decode = true;
|
||||
|
|
@ -427,7 +430,7 @@ dump_shader_binary(void *user_data, const char *short_name,
|
|||
}
|
||||
|
||||
static void
|
||||
read_data_file(FILE *file)
|
||||
read_i915_data_file(FILE *file)
|
||||
{
|
||||
struct intel_spec *spec = NULL;
|
||||
long long unsigned fence;
|
||||
|
|
@ -901,6 +904,9 @@ main(int argc, char *argv[])
|
|||
FILE *file;
|
||||
int c, i;
|
||||
bool help = false, pager = true;
|
||||
char *line = NULL;
|
||||
size_t line_size;
|
||||
|
||||
const struct option aubinator_opts[] = {
|
||||
{ "help", no_argument, (int *) &help, true },
|
||||
{ "no-pager", no_argument, (int *) &pager, false },
|
||||
|
|
@ -987,7 +993,13 @@ main(int argc, char *argv[])
|
|||
if (isatty(1) && pager)
|
||||
setup_pager();
|
||||
|
||||
read_data_file(file);
|
||||
getline(&line, &line_size, file);
|
||||
rewind(file);
|
||||
if (strncmp(line, XE_KMD_ERROR_DUMP_IDENTIFIER, strlen(XE_KMD_ERROR_DUMP_IDENTIFIER)) == 0)
|
||||
read_xe_data_file(file);
|
||||
else
|
||||
read_i915_data_file(file);
|
||||
free(line);
|
||||
fclose(file);
|
||||
|
||||
/* close the stdout which is opened to write the output */
|
||||
|
|
|
|||
11
src/intel/tools/aubinator_error_decode_xe.c
Normal file
11
src/intel/tools/aubinator_error_decode_xe.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright 2024 Intel Corporation
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "aubinator_error_decode_xe.h"
|
||||
|
||||
void
|
||||
read_xe_data_file(FILE *file)
|
||||
{
|
||||
}
|
||||
10
src/intel/tools/aubinator_error_decode_xe.h
Normal file
10
src/intel/tools/aubinator_error_decode_xe.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright 2024 Intel Corporation
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void read_xe_data_file(FILE *file);
|
||||
|
|
@ -42,7 +42,9 @@ aubinator = executable(
|
|||
|
||||
aubinator_error_decode = executable(
|
||||
'aubinator_error_decode',
|
||||
files('aubinator_error_decode.c'),
|
||||
files('aubinator_error_decode.c',
|
||||
'aubinator_error_decode_xe.c',
|
||||
'aubinator_error_decode_xe.h'),
|
||||
dependencies : [idep_mesautil, dep_zlib, dep_thread, idep_intel_dev, idep_intel_decoder],
|
||||
include_directories : [inc_include, inc_src, inc_intel],
|
||||
link_with : [libintel_common, libintel_compiler],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue