public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ian Rogers <irogers@google.com>
Cc: Dominique Martinet <asmadeus@codewreck.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf parse: Allow names to start with digits
Date: Sat, 2 Jul 2022 17:48:03 +0200	[thread overview]
Message-ID: <YsBosxs9TVB0aLrf@krava> (raw)
In-Reply-To: <YsA4+A7TSjzUKDWK@kernel.org>

On Sat, Jul 02, 2022 at 09:24:24AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Sat, Jul 02, 2022 at 06:49:31PM +0900, Dominique Martinet escreveu:
> > Hello,
> > 
> > just making sure my mail didn't get lost -- would anyone have time to
> > look at this?
> > 
> > I don't mind if it's slow or another solution is taken, I'd just like to
> > be able to use 9p probes with perf eventually :)
> 
> Jiri, seems ok, can you please review?

ah right, sorry, I remember looking on that before,
but forgot to respond

> 
> Thanks,
> 
> - Arnaldo
>  
> > Thanks!
> > 
> > Dominique Martinet wrote on Sun, Jun 12, 2022 at 03:15:08PM +0900:
> > > Tracepoints can start with digits, although we don't have many of these:
> > > 
> > > $ rg -g '*.h' '\bTRACE_EVENT\([0-9]'
> > > net/mac802154/trace.h
> > > 53:TRACE_EVENT(802154_drv_return_int,
> > > ...
> > > 
> > > net/ieee802154/trace.h
> > > 66:TRACE_EVENT(802154_rdev_add_virtual_intf,
> > > ...
> > > 
> > > include/trace/events/9p.h
> > > 124:TRACE_EVENT(9p_client_req,
> > > ...
> > > 
> > > Just allow names to start with digits too so e.g. perf probe -e '9p:*'
> > > works
> > > 
> > > Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
> > > ---
> > >  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 5b6e4b5249cf..4133d6950d29 100644
> > > --- a/tools/perf/util/parse-events.l
> > > +++ b/tools/perf/util/parse-events.l
> > > @@ -211,7 +211,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 thought it'd clash with events like cpu/event=3/,
but lexer check numbers first, so we're fine there

it smells like it could break some events, but I couldn't
find any case of that

could you please at least add tests to tests/parse-events.c
for such case?

thanks,
jirka

> > >  name_tag	[\'][a-zA-Z_*?\[\]][a-zA-Z0-9_*?\-,\.\[\]:=]*[\']
> > >  name_minus	[a-zA-Z_*?][a-zA-Z0-9\-_*?.:]*
> > >  drv_cfg_term	[a-zA-Z0-9_\.]+(=[a-zA-Z0-9_*?\.:]+)?
> 
> -- 
> 
> - Arnaldo

  reply	other threads:[~2022-07-02 15:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-12  6:15 [PATCH] perf parse: Allow names to start with digits Dominique Martinet
2022-07-02  9:49 ` Dominique Martinet
2022-07-02 12:24   ` Arnaldo Carvalho de Melo
2022-07-02 15:48     ` Jiri Olsa [this message]
2022-07-02 23:51       ` Dominique Martinet
2022-07-03 13:46         ` Jiri Olsa
2022-07-03 23:58           ` Dominique Martinet
2022-07-04 11:25             ` Jiri Olsa
2022-10-10  5:38               ` Dominique Martinet
2022-10-10 14:05                 ` Jiri Olsa
2022-07-04 21:39 ` Ian Rogers

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=YsBosxs9TVB0aLrf@krava \
    --to=olsajiri@gmail.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=asmadeus@codewreck.org \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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