From: Robert Richter <rric@kernel.org>
To: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Anton Blanchard <anton@au1.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
linuxppc-dev@ozlabs.org, Ingo Molnar <mingo@redhat.com>,
Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Subject: Re: perf: POWER-event translation questions
Date: Tue, 20 Nov 2012 17:50:19 +0100 [thread overview]
Message-ID: <20121120165019.GP2504@rric.localhost> (raw)
In-Reply-To: <CABPqkBQrUVTY9rfeaO+pdaNwZcAgXF45SHnAYJfTvi4HAsPPeQ@mail.gmail.com>
On 09.11.12 11:26:26, Stephane Eranian wrote:
> On Thu, Nov 8, 2012 at 2:10 AM, Sukadev Bhattiprolu
> <sukadev@linux.vnet.ibm.com> wrote:
> > 2. Can we allow hyphens in the {name} token (please see my change to
> > util/parse-events.l below). With this change, I can run:
> >
> The current code does not support this but Andi fixed that in his HSW patch
> and I use it for the PEBS-LL patch series as well.
>
> > perf stat -e cpu/cmplu-stall-bru /tmp/nop
> >
> > without any changes to the user level tool (parse-events.l) I have
> > tested some common cases, not sure if it will break something :-)
But ...
> > diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> > index c87efc1..1967bb2 100644
> > --- a/tools/perf/util/parse-events.l
> > +++ b/tools/perf/util/parse-events.l
> > @@ -80,7 +80,7 @@ event [^,{}/]+
> > 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-Z_*?][-a-zA-Z0-9_*?]*
^
... I wouldn't allow hyphens at the beginning of a name.
And, I am wondering if parsing reserved names like 'cpu-cycles' works
too, e.g. cpu/cpu-cycles-foobar/. There are many reserved words in the
lexer with hyphens in it. This might cause unexpected problems.
-Robert
prev parent reply other threads:[~2012-11-20 16:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 1:10 perf: POWER-event translation questions Sukadev Bhattiprolu
2012-11-09 10:26 ` Stephane Eranian
2012-11-20 16:50 ` Robert Richter [this message]
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=20121120165019.GP2504@rric.localhost \
--to=rric@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=anton@au1.ibm.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=sukadev@linux.vnet.ibm.com \
/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).