From: tip-bot for David Ahern <dsahern@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com,
mingo@redhat.com, a.p.zijlstra@chello.nl, fweisbec@gmail.com,
dsahern@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/stat] perf stat: Tell user about unsupported events in the list
Date: Sat, 30 Apr 2011 07:16:24 GMT [thread overview]
Message-ID: <tip-c63ca0c01d73563d4e2ab174bb3dd1e5efb907e6@git.kernel.org> (raw)
In-Reply-To: <1304114655-10600-1-git-send-email-dsahern@gmail.com>
Commit-ID: c63ca0c01d73563d4e2ab174bb3dd1e5efb907e6
Gitweb: http://git.kernel.org/tip/c63ca0c01d73563d4e2ab174bb3dd1e5efb907e6
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Fri, 29 Apr 2011 16:04:15 -0600
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 30 Apr 2011 00:18:14 +0200
perf stat: Tell user about unsupported events in the list
Similar to perf-record, tell user about unsupported events
that will not be counted if invoked in verbose mode.
e.g.,
$ perf stat -e dTLB-prefetch-misses -v -- sleep 1
dTLB-prefetch-misses event is not supported by the kernel.
dTLB-prefetch-misses: 0 0 0
Performance counter stats for 'sleep 1':
<not counted> dTLB-prefetch-misses
1.001884783 seconds time elapsed
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1304114655-10600-1-git-send-email-dsahern@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/builtin-stat.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index c8b535b..602c3c9 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -377,8 +377,12 @@ static int run_perf_stat(int argc __used, const char **argv)
list_for_each_entry(counter, &evsel_list->entries, node) {
if (create_perf_stat_counter(counter) < 0) {
- if (errno == EINVAL || errno == ENOSYS || errno == ENOENT)
+ if (errno == EINVAL || errno == ENOSYS || errno == ENOENT) {
+ if (verbose)
+ ui__warning("%s event is not supported by the kernel.\n",
+ event_name(counter));
continue;
+ }
if (errno == EPERM || errno == EACCES) {
error("You may not have permission to collect %sstats.\n"
prev parent reply other threads:[~2011-04-30 7:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 22:04 [PATCH] perf stat: tell user about unsupported events in the list David Ahern
2011-04-30 7:16 ` tip-bot for David Ahern [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=tip-c63ca0c01d73563d4e2ab174bb3dd1e5efb907e6@git.kernel.org \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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