From c81cc149abf402548eded61c5e83b4a30475a710 Mon Sep 17 00:00:00 2001 From: Simon Kaempflein Date: Mon, 16 Nov 2009 15:25:53 +1000 Subject: [PATCH] --- yaml --- r: 169743 b: refs/heads/master c: bfd451184d80301d1ae970b1ebffde1e9c6240f9 h: refs/heads/master i: 169741: 18f3c4f602c31b58d44a64b1e4623f4dd3baa0fe 169739: 4b2fa52c8985da1fe49826974c6e7f14e781740a 169735: 38e16d1da391e8db83283a07084cdc359062fa33 169727: bee6342f96705e69683fca04ab71f30f4b2d8542 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-record.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a1afde7467b1..671021543057 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 81516c5fc83a13a1d12f466aa7e14f5fd62a63ce +refs/heads/master: bfd451184d80301d1ae970b1ebffde1e9c6240f9 diff --git a/trunk/tools/perf/builtin-record.c b/trunk/tools/perf/builtin-record.c index 87f98fdb0513..0e519c667e3a 100644 --- a/trunk/tools/perf/builtin-record.c +++ b/trunk/tools/perf/builtin-record.c @@ -307,6 +307,12 @@ static void create_counter(int counter, int cpu, pid_t pid) printf("\n"); error("perfcounter syscall returned with %d (%s)\n", 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"); exit(-1); }