aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-03-03 01:17:53 -0500
committerIngo Molnar <mingo@kernel.org>2015-03-03 01:17:53 -0500
commit94ac003b665fc04f13a7ab3b2be896b9b9503451 (patch)
tree1fdaaf514ed20dfd1f3657693a55ab1547f1a656 /tools/perf/builtin-stat.c
parent788b94ba6c223d4ce955218d59075cd1edb92692 (diff)
parentae536acfacb65a4a9858c32b12361e09f84f4157 (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Warn if given uprobe event accesses memory on older kernel (Masami Hiramatsu) - 'perf record' Documentation fixes (Namhyung Kim) - Report unsupported events properly in 'perf stat' (Suzuki K. Poulose) Infrastructure changes: - Avoid FORK after COMM when synthesizing records for pre-existing threads (Arnaldo Carvalho de Melo) - Reference count struct thread (Arnaldo Carvalho de Melo) - Don't keep the session around in 'perf sched', thread refcounting removes that need (Arnaldo Carvalho de Melo) - Initialize cpu set in pthread_attr_setaffinity_np() feature test (Adrian Hunter) - Only include tsc file for x86 (David Ahern) - Compare JOBS to 0 after grep (David Ahern) - Improve feature detection messages (Ingo Molnar) - Revert "perf: Remove the extra validity check on nr_pages" (Kan Liang) - Remove bias offset to find probe point by address (Masami Hiramatsu) - Fix build error on ARCH=i386/x86_64/sparc64 (Namhyung Kim) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r--tools/perf/builtin-stat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index e598e4e98170..d28949d210cc 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -510,6 +510,9 @@ static int read_counter(struct perf_evsel *counter)
510 int ncpus = perf_evsel__nr_cpus(counter); 510 int ncpus = perf_evsel__nr_cpus(counter);
511 int cpu, thread; 511 int cpu, thread;
512 512
513 if (!counter->supported)
514 return -ENOENT;
515
513 if (counter->system_wide) 516 if (counter->system_wide)
514 nthreads = 1; 517 nthreads = 1;
515 518
@@ -1285,7 +1288,7 @@ static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
1285 if (prefix) 1288 if (prefix)
1286 fprintf(output, "%s", prefix); 1289 fprintf(output, "%s", prefix);
1287 1290
1288 if (scaled == -1) { 1291 if (scaled == -1 || !counter->supported) {
1289 fprintf(output, "%*s%s", 1292 fprintf(output, "%*s%s",
1290 csv_output ? 0 : 18, 1293 csv_output ? 0 : 18,
1291 counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED, 1294 counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED,