X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=tools%2Fperf%2Fbuiltin-stat.c;h=307e8a1a003c5ebfd7eefe6a8770a868cd3b55e9;hb=42ef8a78c1f49f53f29f0f3a6f9a5bcbc653233e;hp=1f19f2f999c841b9da140e10bcaf5e6e0f41ee6b;hpb=ed7d6bc23b6dd8f5272431ce930c84d1e537be49;p=mirror_ubuntu-artful-kernel.git diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 1f19f2f999c8..307e8a1a003c 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -528,6 +528,7 @@ static int __run_perf_stat(int argc, const char **argv) perf_evlist__set_leader(evsel_list); evlist__for_each(evsel_list, counter) { +try_again: if (create_perf_stat_counter(counter) < 0) { /* * PPC returns ENXIO for HW counters until 2.6.37 @@ -544,7 +545,11 @@ static int __run_perf_stat(int argc, const char **argv) if ((counter->leader != counter) || !(counter->leader->nr_members > 1)) continue; - } + } else if (perf_evsel__fallback(counter, errno, msg, sizeof(msg))) { + if (verbose) + ui__warning("%s\n", msg); + goto try_again; + } perf_evsel__open_strerror(counter, &target, errno, msg, sizeof(msg));