Merge tag 'cpumask-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / tools / perf / builtin-stat.c
index c95dbdad98c3fc726dd5a1657ffd9c843954e317..f7b8218785f6fa8911bc9c8544d7eb14ff9e2f2f 100644 (file)
@@ -684,8 +684,9 @@ static int __run_perf_stat(int argc, const char **argv)
                        unit_width = l;
        }
 
-       if (perf_evlist__apply_filters(evsel_list)) {
-               error("failed to set filter with %d (%s)\n", errno,
+       if (perf_evlist__apply_filters(evsel_list, &counter)) {
+               error("failed to set filter \"%s\" on event %s with %d (%s)\n",
+                       counter->filter, perf_evsel__name(counter), errno,
                        strerror_r(errno, msg, sizeof(msg)));
                return -1;
        }
@@ -1094,6 +1095,8 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg)
                if (total) {
                        ratio = avg / total;
                        fprintf(output, " #   %5.2f  insns per cycle        ", ratio);
+               } else {
+                       fprintf(output, "                                   ");
                }
                total = avg_stats(&runtime_stalled_cycles_front_stats[cpu]);
                total = max(total, avg_stats(&runtime_stalled_cycles_back_stats[cpu]));
@@ -1163,6 +1166,8 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg)
                if (total) {
                        ratio = avg / total;
                        fprintf(output, " # %8.3f GHz                    ", ratio);
+               } else {
+                       fprintf(output, "                                   ");
                }
        } else if (transaction_run &&
                   perf_evsel__cmp(evsel, nth_evsel(T_CYCLES_IN_TX))) {