[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fVA6y-osb6EHAU50FybpOeFC6x0e7QLk2XmyMfQPnAWDQ@mail.gmail.com>
Date: Fri, 15 Nov 2019 23:52:23 -0800
From: Ian Rogers <irogers@...gle.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Ravi Bangoria <ravi.bangoria@...ux.ibm.com>,
Anju T Sudhakar <anju@...ux.vnet.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Thomas Richter <tmricht@...ux.ibm.com>,
Andi Kleen <ak@...ux.intel.com>,
Jin Yao <yao.jin@...ux.intel.com>,
Allison Randal <allison@...utok.net>,
Davidlohr Bueso <dave@...olabs.net>,
Thomas Gleixner <tglx@...utronix.de>,
Adrian Hunter <adrian.hunter@...el.com>,
LKML <linux-kernel@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf tools: report initial event parsing error
On Mon, Nov 11, 2019 at 4:02 AM Jiri Olsa <jolsa@...hat.com> wrote:
>
> On Fri, Nov 08, 2019 at 10:15:33AM -0800, Ian Rogers wrote:
> > Record the first event parsing error and report. Implementing feedback
> > from Jiri Olsa:
> > https://lkml.org/lkml/2019/10/28/680
> >
> > An example error is:
> >
> > $ tools/perf/perf stat -e c/c/
> > WARNING: multiple event parsing errors
> > event syntax error: 'c/c/'
> > \___ unknown term
> >
> > valid terms: event,filter_rem,filter_opc0,edge,filter_isoc,filter_tid,filter_loc,filter_nc,inv,umask,filter_opc1,tid_en,thresh,filter_all_op,filter_not_nm,filter_state,filter_nm,config,config1,config2,name,period,percore
> >
> > Initial error:
> > event syntax error: 'c/c/'
> > \___ Cannot find PMU `c'. Missing kernel support?
>
> not sure where this got lost or if it was there before,
> but the index should point to zero to have the 'arrow' aligned
This happened in:
448d732cefb3 perf parse: Add parse events handle error
When the code wasn't clear on the value of idx it was set to -1.
Fixed in v2 but perhaps there are other instances from 448d732cefb3
that should be addressed.
Thanks,
Ian
> jirka
>
>
> ---
> diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
> index a369bbc289b2..6bae9d6edc12 100644
> --- a/tools/perf/util/parse-events.c
> +++ b/tools/perf/util/parse-events.c
> @@ -1366,7 +1366,7 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
> if (asprintf(&err_str,
> "Cannot find PMU `%s'. Missing kernel support?",
> name) >= 0)
> - parse_events__handle_error(err, -1, err_str, NULL);
> + parse_events__handle_error(err, 0, err_str, NULL);
> return -EINVAL;
> }
>
>
Powered by blists - more mailing lists