lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fWUm9X1_Yj_sqHQqCqfSpcrXsDggJRO+GN2jo=km-0bBQ@mail.gmail.com>
Date: Wed, 8 May 2024 14:44:08 -0700
From: Ian Rogers <irogers@...gle.com>
To: Dominique Martinet <asmadeus@...ewreck.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Jiri Olsa <jolsa@...nel.org>, 
	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
	Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, 
	Adrian Hunter <adrian.hunter@...el.com>, linux-perf-users@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] perf parse: Allow names to start with digits

On Sun, May 5, 2024 at 4:14 AM Dominique Martinet
<asmadeus@...ewreck.org> wrote:
>
> 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 trace -e '9p:*'
> works
>
> Signed-off-by: Dominique Martinet <asmadeus@...ewreck.org>

Reviewed-by: Ian Rogers <irogers@...gle.com>
Tested-by: Ian Rogers <irogers@...gle.com>

Thanks,
Ian

> ---
>  tools/perf/tests/parse-events.c | 5 +++++
>  tools/perf/util/parse-events.l  | 4 ++--
>  2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
> index ef056e8740fe..6cf055dd5c09 100644
> --- a/tools/perf/tests/parse-events.c
> +++ b/tools/perf/tests/parse-events.c
> @@ -2280,6 +2280,11 @@ static const struct evlist_test test__events[] = {
>                 .check = test__checkevent_breakpoint_2_events,
>                 /* 3 */
>         },
> +       {
> +               .name = "9p:9p_client_req",
> +               .check = test__checkevent_tracepoint,
> +               /* 4 */
> +       },
>  };
>
>  static const struct evlist_test test__events_pmu[] = {
> diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> index e86c45675e1d..c36f8dbf593a 100644
> --- a/tools/perf/util/parse-events.l
> +++ b/tools/perf/util/parse-events.l
> @@ -158,8 +158,8 @@ event               [^,{}/]+
>  num_dec                [0-9]+
>  num_hex                0x[a-fA-F0-9]{1,16}
>  num_raw_hex    [a-fA-F0-9]{1,16}
> -name           [a-zA-Z_*?\[\]][a-zA-Z0-9_*?.\[\]!\-]*
> -name_tag       [\'][a-zA-Z_*?\[\]][a-zA-Z0-9_*?\-,\.\[\]:=]*[\']
> +name           [a-zA-Z0-9_*?\[\]][a-zA-Z0-9_*?.\[\]!\-]*
> +name_tag       [\'][a-zA-Z0-9_*?\[\]][a-zA-Z0-9_*?\-,\.\[\]:=]*[\']
>  name_minus     [a-zA-Z_*?][a-zA-Z0-9\-_*?.:]*
>  drv_cfg_term   [a-zA-Z0-9_\.]+(=[a-zA-Z0-9_*?\.:]+)?
>  /*
>
> --
> 2.44.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ