lkml.org 
[lkml]   [2022]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf parse: Allow names to start with digits
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?

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_*?.\[\]!]*
> > 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

\
 
 \ /
  Last update: 2022-07-02 14:25    [W:0.100 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site