diff options
author | Simon Kaempflein <s.kaempflein@gmx.de> | 2009-11-16 00:25:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-23 03:40:13 -0500 |
commit | bfd451184d80301d1ae970b1ebffde1e9c6240f9 (patch) | |
tree | 2080c2595b0efa4b771dc2a649ef0a1ac141f921 /tools/perf/builtin-record.c | |
parent | 81516c5fc83a13a1d12f466aa7e14f5fd62a63ce (diff) |
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>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 87f98fdb0513..0e519c667e3a 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -307,6 +307,12 @@ try_again: | |||
307 | printf("\n"); | 307 | printf("\n"); |
308 | error("perfcounter syscall returned with %d (%s)\n", | 308 | error("perfcounter syscall returned with %d (%s)\n", |
309 | fd[nr_cpu][counter], strerror(err)); | 309 | fd[nr_cpu][counter], strerror(err)); |
310 | |||
311 | #if defined(__i386__) || defined(__x86_64__) | ||
312 | if (attr->type == PERF_TYPE_HARDWARE && err == EOPNOTSUPP) | ||
313 | 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"); | ||
314 | #endif | ||
315 | |||
310 | die("No CONFIG_PERF_EVENTS=y kernel support configured?\n"); | 316 | die("No CONFIG_PERF_EVENTS=y kernel support configured?\n"); |
311 | exit(-1); | 317 | exit(-1); |
312 | } | 318 | } |