linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Shunsuke Nakamura <nakamura.shun@jp.fujitsu.com>,
	John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Leo Yan <leo.yan@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 2/3] perf tools: Add lexical definition of event name
Date: Tue, 16 Feb 2021 17:23:18 +0900	[thread overview]
Message-ID: <CAM9d7cg7Znpwo8RKAibkmuMVoinGFa9C4WGJsUnfb728wdG-Ag@mail.gmail.com> (raw)
In-Reply-To: <YCpqVuneU+wWtmMC@krava>

On Mon, Feb 15, 2021 at 9:34 PM Jiri Olsa <jolsa@redhat.com> wrote:
>
> On Fri, Feb 12, 2021 at 06:03:17PM +0900, Shunsuke Nakamura wrote:
> > Add the lexical definition of event name so that the numbers are recognizable.
> >
> > A64FX defines an event name that starts with a number.
> >  - 0inst_commit
> >  - 1inst_commit
> >  - 2inst_commit
> >  - 3inst_commit
> >  - 4inst_commit
> >
> > Signed-off-by: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
> > ---
> >  tools/perf/util/parse-events.l | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> > index 0b36285a9435..33f627187415 100644
> > --- a/tools/perf/util/parse-events.l
> > +++ b/tools/perf/util/parse-events.l
> > @@ -205,7 +205,7 @@ bpf_source        [^,{}]+\.c[a-zA-Z0-9._]*
> >  num_dec              [0-9]+
> >  num_hex              0x[a-fA-F0-9]+
> >  num_raw_hex  [a-fA-F0-9]+
> > -name         [a-zA-Z_*?\[\]][a-zA-Z0-9_*?.\[\]]*
> > +name         [a-zA-Z0-9_*?\[\]][a-zA-Z0-9_*?.\[\]]*
>
> I can't see anything broken because of this change,
> also numbers are defined few lines before so we should
> be fine

But this change makes the syntax ambiguous with numbers
and names. I don't think it's a good idea.

Is it possible to change the event names not having numbers
at the beginning like inst_commit0, inst_commit1 and so on?

Thanks,
Namhyung

  reply	other threads:[~2021-02-16  8:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12  9:03 [PATCH v6 0/3] perf vendor events: Support PMU events for A64FX Shunsuke Nakamura
2021-02-12  9:03 ` [PATCH v6 1/3] perf vendor events arm64: Add more common and uarch events Shunsuke Nakamura
2021-02-12  9:03 ` [PATCH v6 2/3] perf tools: Add lexical definition of event name Shunsuke Nakamura
2021-02-12  9:53   ` John Garry
2021-02-15 12:34   ` Jiri Olsa
2021-02-16  8:23     ` Namhyung Kim [this message]
2021-02-16 11:13       ` Jiri Olsa
2021-02-12  9:03 ` [PATCH v6 3/3] perf vendor events arm64: Add Fujitsu A64FX pmu event Shunsuke Nakamura
2021-02-12  9:52   ` 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=CAM9d7cg7Znpwo8RKAibkmuMVoinGFa9C4WGJsUnfb728wdG-Ag@mail.gmail.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=john.garry@huawei.com \
    --cc=jolsa@redhat.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=nakamura.shun@jp.fujitsu.com \
    --cc=peterz@infradead.org \
    --cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).