diff options
author | David Ahern <dsahern@gmail.com> | 2011-04-29 18:04:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-29 18:18:14 -0400 |
commit | c63ca0c01d73563d4e2ab174bb3dd1e5efb907e6 (patch) | |
tree | c00105af90d900c5eacacb43bbb499229043d0f9 /tools/perf/builtin-stat.c | |
parent | 947b4ad1d198b7303ecc961f4939a331be0c48f0 (diff) |
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>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r-- | 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 c8b535bc27bd..602c3c96fa1e 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) | |||
377 | 377 | ||
378 | list_for_each_entry(counter, &evsel_list->entries, node) { | 378 | list_for_each_entry(counter, &evsel_list->entries, node) { |
379 | if (create_perf_stat_counter(counter) < 0) { | 379 | if (create_perf_stat_counter(counter) < 0) { |
380 | if (errno == EINVAL || errno == ENOSYS || errno == ENOENT) | 380 | if (errno == EINVAL || errno == ENOSYS || errno == ENOENT) { |
381 | if (verbose) | ||
382 | ui__warning("%s event is not supported by the kernel.\n", | ||
383 | event_name(counter)); | ||
381 | continue; | 384 | continue; |
385 | } | ||
382 | 386 | ||
383 | if (errno == EPERM || errno == EACCES) { | 387 | if (errno == EPERM || errno == EACCES) { |
384 | error("You may not have permission to collect %sstats.\n" | 388 | error("You may not have permission to collect %sstats.\n" |