mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
perf record, x86: Print more intelligent error message when sampling fails
Print more accurate error message when "perf record" fails because there is no APIC support, on x86. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
81516c5fc8
commit
bfd451184d
1 changed files with 6 additions and 0 deletions
|
@ -307,6 +307,12 @@ try_again:
|
||||||
printf("\n");
|
printf("\n");
|
||||||
error("perfcounter syscall returned with %d (%s)\n",
|
error("perfcounter syscall returned with %d (%s)\n",
|
||||||
fd[nr_cpu][counter], strerror(err));
|
fd[nr_cpu][counter], strerror(err));
|
||||||
|
|
||||||
|
#if defined(__i386__) || defined(__x86_64__)
|
||||||
|
if (attr->type == PERF_TYPE_HARDWARE && err == EOPNOTSUPP)
|
||||||
|
die("No hardware sampling interrupt available. No APIC? If so then you can boot the kernel with the \"lapic\" boot parameter to force-enable it.\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
die("No CONFIG_PERF_EVENTS=y kernel support configured?\n");
|
die("No CONFIG_PERF_EVENTS=y kernel support configured?\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue