intel/error2aub: add a verbose option
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
This commit is contained in:
parent
ca0161f890
commit
c619ea945d
|
@ -231,16 +231,17 @@ int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i, c;
|
int i, c;
|
||||||
bool help = false;
|
bool help = false, verbose;
|
||||||
char *out_filename = NULL, *in_filename = NULL;
|
char *out_filename = NULL, *in_filename = NULL;
|
||||||
const struct option aubinator_opts[] = {
|
const struct option aubinator_opts[] = {
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
{ "output", required_argument, NULL, 'o' },
|
{ "output", required_argument, NULL, 'o' },
|
||||||
|
{ "verbose", no_argument, NULL, 'v' },
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while ((c = getopt_long(argc, argv, "ho:", aubinator_opts, &i)) != -1) {
|
while ((c = getopt_long(argc, argv, "ho:v", aubinator_opts, &i)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'h':
|
case 'h':
|
||||||
help = true;
|
help = true;
|
||||||
|
@ -248,6 +249,9 @@ main(int argc, char *argv[])
|
||||||
case 'o':
|
case 'o':
|
||||||
out_filename = strdup(optarg);
|
out_filename = strdup(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'v':
|
||||||
|
verbose = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -306,6 +310,8 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
aub_file_init(&aub, aub_file,
|
aub_file_init(&aub, aub_file,
|
||||||
NULL, pci_id, "error_state");
|
NULL, pci_id, "error_state");
|
||||||
|
if (verbose)
|
||||||
|
aub.verbose_log_file = stdout;
|
||||||
fail_if(!aub_use_execlists(&aub),
|
fail_if(!aub_use_execlists(&aub),
|
||||||
"%s currently only works on gen8+\n", argv[0]);
|
"%s currently only works on gen8+\n", argv[0]);
|
||||||
continue;
|
continue;
|
||||||
|
@ -423,6 +429,14 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (verbose) {
|
||||||
|
fprintf(stdout, "BOs found:\n");
|
||||||
|
list_for_each_entry(struct bo, bo_entry, &bo_list, link) {
|
||||||
|
fprintf(stdout, "\t type=%i addr=0x%016" PRIx64 " size=%" PRIu64 "\n",
|
||||||
|
bo_entry->type, bo_entry->addr, bo_entry->size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Find the batch that trigger the hang */
|
/* Find the batch that trigger the hang */
|
||||||
struct bo *batch_bo = NULL;
|
struct bo *batch_bo = NULL;
|
||||||
list_for_each_entry(struct bo, bo_entry, &bo_list, link) {
|
list_for_each_entry(struct bo, bo_entry, &bo_list, link) {
|
||||||
|
|
Loading…
Reference in New Issue