lkml.org 
[lkml]   [2020]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 03/11] 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 9aa51a65593d..9c5c72094112 100644
    --- a/tools/perf/util/evsel.c
    +++ b/tools/perf/util/evsel.c
    @@ -2533,6 +2533,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.25.1
    \
     
     \ /
      Last update: 2020-07-09 19:38    [W:3.101 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site