diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-stat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 5658a770dbd7..da77077450cf 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -372,7 +372,10 @@ static int run_perf_stat(int argc __used, const char **argv) | |||
372 | 372 | ||
373 | list_for_each_entry(counter, &evsel_list->entries, node) { | 373 | list_for_each_entry(counter, &evsel_list->entries, node) { |
374 | if (create_perf_stat_counter(counter) < 0) { | 374 | if (create_perf_stat_counter(counter) < 0) { |
375 | if (errno == -EPERM || errno == -EACCES) { | 375 | if (errno == EINVAL || errno == ENOSYS) |
376 | continue; | ||
377 | |||
378 | if (errno == EPERM || errno == EACCES) { | ||
376 | error("You may not have permission to collect %sstats.\n" | 379 | error("You may not have permission to collect %sstats.\n" |
377 | "\t Consider tweaking" | 380 | "\t Consider tweaking" |
378 | " /proc/sys/kernel/perf_event_paranoid or running as root.", | 381 | " /proc/sys/kernel/perf_event_paranoid or running as root.", |