From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Michael Petlan <mpetlan@redhat.com>,
Joe Mario <jmario@redhat.com>, Andi Kleen <ak@linux.intel.com>,
Kajol Jain <kjain@linux.ibm.com>,
John Garry <john.garry@huawei.com>
Subject: Re: [PATCH 4/4] perf expr: Report line number with error
Date: Wed, 13 May 2020 11:08:25 -0300 [thread overview]
Message-ID: <20200513140825.GG5583@kernel.org> (raw)
In-Reply-To: <20200513113424.GJ3158213@krava>
Em Wed, May 13, 2020 at 01:34:24PM +0200, Jiri Olsa escreveu:
> 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 ;-)
So I had started processing this patchkit, I assume you will send a v2
and I should drop what I had processed, is that ok?
- Arnaldo
next prev parent reply other threads:[~2020-05-13 14:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 20:53 [PATCHv3 0/4] perf tools: Add support for user defined metric Jiri Olsa
2020-05-11 20:53 ` [PATCH 1/4] perf expr: Add parsing support for multiple expressions Jiri Olsa
2020-05-13 6:50 ` Ian Rogers
2020-05-13 11:25 ` Jiri Olsa
2020-05-11 20:53 ` [PATCH 2/4] perf expr: Allow comments in custom metric file Jiri Olsa
2020-05-11 20:53 ` [PATCH 3/4] perf stat: Add --metrics-file option Jiri Olsa
2020-05-13 7:04 ` Ian Rogers
2020-05-13 11:33 ` Jiri Olsa
2020-05-14 3:41 ` Ian Rogers
2020-05-11 20:53 ` [PATCH 4/4] perf expr: Report line number with error Jiri Olsa
2020-05-13 7:09 ` Ian Rogers
2020-05-13 11:34 ` Jiri Olsa
2020-05-13 14:08 ` Arnaldo Carvalho de Melo [this message]
2020-05-13 14:46 ` Jiri Olsa
2020-05-13 15:14 ` Arnaldo Carvalho de Melo
2022-01-25 12:34 ` [PATCHv3 0/4] perf tools: Add support for user defined metric John Garry
2022-01-25 12:41 ` Arnaldo Carvalho de Melo
2022-01-25 12:51 ` John Garry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200513140825.GG5583@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jmario@redhat.com \
--cc=john.garry@huawei.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=kjain@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.