lkml.org 
[lkml]   [2020]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 03/12] perf tools: Improve aux_output not supported error
Date
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 <adrian.hunter@intel.com>
---
tools/perf/util/evsel.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 80a7f9862aec..6606c1e3b4fe 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2539,6 +2539,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'",
--
2.17.1
\
 
 \ /
  Last update: 2020-07-10 17:13    [W:0.181 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site