diff options
-rw-r--r-- | tools/perf/builtin-stat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index e720ba7b801e..d0605689bad9 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -462,8 +462,13 @@ static int run_perf_stat(int argc __used, const char **argv) | |||
462 | 462 | ||
463 | list_for_each_entry(counter, &evsel_list->entries, node) { | 463 | list_for_each_entry(counter, &evsel_list->entries, node) { |
464 | if (create_perf_stat_counter(counter, first) < 0) { | 464 | if (create_perf_stat_counter(counter, first) < 0) { |
465 | /* | ||
466 | * PPC returns ENXIO for HW counters until 2.6.37 | ||
467 | * (behavior changed with commit b0a873e). | ||
468 | */ | ||
465 | if (errno == EINVAL || errno == ENOSYS || | 469 | if (errno == EINVAL || errno == ENOSYS || |
466 | errno == ENOENT || errno == EOPNOTSUPP) { | 470 | errno == ENOENT || errno == EOPNOTSUPP || |
471 | errno == ENXIO) { | ||
467 | if (verbose) | 472 | if (verbose) |
468 | ui__warning("%s event is not supported by the kernel.\n", | 473 | ui__warning("%s event is not supported by the kernel.\n", |
469 | event_name(counter)); | 474 | event_name(counter)); |