From: "Simon Kämpflein" <s.kaempflein@gmx.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Mike Galbraith <efault@gmx.de>,
bfweisbec@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: perf counters: problem with perf record
Date: Mon, 16 Nov 2009 15:25:53 +1000 [thread overview]
Message-ID: <4B00E261.6080701@gmx.de> (raw)
In-Reply-To: <20091115103459.GC24931@elte.hu>
Ingo Molnar wrote
>> Maybe it's a good idea to add another comment making it clear that the
>> performance counters are not fully working in this case. Or detect this
>> case in "perf-record" and output a message relating to that.
>
> Ok. Mind sending a patch that changes the message so that it explains it
> all to you more clearly?
Here's a patch for this:
More accurate error message when "perf record" fails because there is no
APIC support:
---
tools/perf/builtin-record.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 04f335e..77b21f1 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -303,6 +303,10 @@ try_again:
printf("\n");
error("perfcounter syscall returned with %d (%s)\n",
fd[nr_cpu][counter], strerror(err));
+
+ if (attr->type == PERF_TYPE_HARDWARE && err == EOPNOTSUPP)
+ die("No hardware sampling interrupt available.
No APIC? Boot the kernel with the \"lapic\" boot parameter to
force-enable it.\n");
+
die("No CONFIG_PERF_EVENTS=y kernel support configured?\n");
exit(-1);
}
--
1.5.4.3
>
>>> And does booting with the suggested lapic parameter cure your problems?
>>>
>> Yes, thank you!
>
> Great.
>
> You might want to send another patch that allows the .config enabling of
> that lapic boot parameter. It sucks to carry around boot parameters.
>
I'm not sure if this is a good idea. Some systems may crash if you
force-enable it:
http://lkml.indiana.edu/hypermail/linux/kernel/0307.3/1635.html
And I'm also not familiar with the kernel internals on that topic ;)
Simon
prev parent reply other threads:[~2009-11-16 5:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-14 17:14 perf counters: problem with perf record Simon Kämpflein
2009-11-14 19:46 ` Peter Zijlstra
2009-11-15 10:06 ` Simon Kämpflein
2009-11-15 10:34 ` Ingo Molnar
2009-11-16 5:25 ` Simon Kämpflein [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B00E261.6080701@gmx.de \
--to=s.kaempflein@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=bfweisbec@gmail.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox