perf evsel: Say which PMU Hardware event doesn't support sampling/overflow-interrupts
authorKim Phillips <kim.phillips@arm.com>
Tue, 14 Nov 2017 21:04:52 +0000 (15:04 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 16 Nov 2017 17:50:03 +0000 (14:50 -0300)
commit114bc191c37028d87a540251d93e7b328f4de3fe
tree09316672b9316aca051cfc3ba1fd3b606210242c
parent239fb4fed6c49110ebebe7378a84d96e3f0cf55d
perf evsel: Say which PMU Hardware event doesn't support sampling/overflow-interrupts

Help identify to the user the event with the unsupported sampling error.
Also suggest a corrective action.

BEFORE:

$ sudo ./oldperf record -e armv8_pmuv3/mem_access/,ccn/cycles/,armv8_pmuv3/l2d_cache/ true
Error:
PMU Hardware doesn't support sampling/overflow-interrupts.

AFTER:

$ sudo ./newperf record -e armv8_pmuv3/mem_access/,ccn/cycles/,armv8_pmuv3/l2d_cache/ true
Error:
ccn/cycles/: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'

Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20171114150452.e846f2e23684c7d7d8ee706f@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c