From 385f44568eb8c99656aad4c3773ac4524875596d Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 8 May 2012 09:29:16 -0600 Subject: [PATCH] --- yaml --- r: 300292 b: refs/heads/master c: 20d23aaa31da295378abff4272716e3dfc72baf0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-stat.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8ce880485872..cfb6d02cd6d0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 09c0211c0bb0e40231e6ee9a35041d467ed72f16 +refs/heads/master: 20d23aaa31da295378abff4272716e3dfc72baf0 diff --git a/trunk/tools/perf/builtin-stat.c b/trunk/tools/perf/builtin-stat.c index 4532a789fbe3..1e5e9b270f5e 100644 --- a/trunk/tools/perf/builtin-stat.c +++ b/trunk/tools/perf/builtin-stat.c @@ -488,8 +488,13 @@ 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, first) < 0) { + /* + * PPC returns ENXIO for HW counters until 2.6.37 + * (behavior changed with commit b0a873e). + */ if (errno == EINVAL || errno == ENOSYS || - errno == ENOENT || errno == EOPNOTSUPP) { + errno == ENOENT || errno == EOPNOTSUPP || + errno == ENXIO) { if (verbose) ui__warning("%s event is not supported by the kernel.\n", event_name(counter));