From: Adrian Hunter Date: Fri, 10 Jul 2020 15:10:55 +0000 (+0300) Subject: perf tools: Improve aux_output not supported error X-Git-Tag: v5.15~3130^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c9a11af84b19e42a8e51a3cac6e08efc546d281;p=platform%2Fkernel%2Flinux-starfive.git perf tools: Improve aux_output not supported error For example: Before: $ perf record -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -- ls -l Error: branch-loads: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat' After: $ perf record -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -- ls -l Error: branch-loads: PMU Hardware doesn't support 'aux_output' feature Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 11794d3..b1845f7 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -2535,6 +2535,10 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target, "No such device - did you specify an out-of-range profile CPU?"); break; case EOPNOTSUPP: + if (evsel->core.attr.aux_output) + return scnprintf(msg, size, + "%s: PMU Hardware doesn't support 'aux_output' feature", + evsel__name(evsel)); if (evsel->core.attr.sample_period != 0) return scnprintf(msg, size, "%s: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'",