lkml.org 
[lkml]   [2020]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] perf expr: Report line number with error
On Wed, May 13, 2020 at 12:09:30AM -0700, Ian Rogers wrote:
> On Mon, May 11, 2020 at 1:54 PM Jiri Olsa <jolsa@kernel.org> wrote:
> >
> > Display line number on when parsing custom metrics file, like:
> >
> > $ cat metrics
> > // IPC
> > mine1 = inst_retired.any / cpu_clk_unhalted.thread;
> >
> > krava
> > $ sudo perf stat --metrics-file ./metrics -M mine1 -a -I 1000 --metric-only
> > failed to parse metrics file: ./metrics:4
> >
> > Please note that because the grammar is flexible on new lines,
> > the syntax could be broken on the next 'not fitting' item and
> > not the first wrong word, like:
> >
> > $ cat metrics
> > // IPC
> > krava
> > mine1 = inst_retired.any / cpu_clk_unhalted.thread;
> > $ sudo perf stat --metrics-file ./metrics -M mine1 -a -I 1000 --metric-only
> > failed to parse metrics file: ./metrics:3
>
> A line number is better than nothing :-) It'd be nice to be told about
> broken events and more information about what's broken in the line. A
> common failure is @ vs / encoding and also no-use or misuse of \\.
> Perhaps expand the test coverage.

yep, error reporting needs more changes.. but the line is crucial ;-)

jirka

\
 
 \ /
  Last update: 2020-05-13 13:35    [W:0.238 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site