From: Dominique Martinet <asmadeus@codewreck.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] perf parse: Allow names to start with digits
Date: Sun, 7 Apr 2024 21:38:05 +0900 [thread overview]
Message-ID: <ZhKTrUPbUnBviQYK@codewreck.org> (raw)
In-Reply-To: <20240407-perf_digit-v1-3-57ec37c63394@codewreck.org>
Dominique Martinet wrote on Sun, Apr 07, 2024 at 09:18:21PM +0900:
> diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> index e86c45675e1d..41c30ff29783 100644
> --- a/tools/perf/util/parse-events.l
> +++ b/tools/perf/util/parse-events.l
> @@ -158,7 +158,7 @@ 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 [a-zA-Z0-9_*?\[\]][a-zA-Z0-9_*?.\[\]!\-]*
grmbl sorry I guess I didn't actually test this two years ago (?!), or
used it differently (commit message is weird and also needs fixing,
perf probe -e 9p:* does not make sense) or something changed but
that's not enough:
----
$ sudo ./perf trace -e 9p:9p_fid_ref
event syntax error: '9p:9p_fid_ref'
\___ parser error
Run 'perf list' for a list of valid events
----
Adding 0-9 to name_tag as well makes perf trace works.
I'm not sure what name_minus is for but I did't need to add that one in
my test.
That also highlights that the test I added isn't sufficient, if someone
familiar with the code could hint at a better place to test please tell!
Otherwise I'll have a look next weekend, I need to get back to my 9p
bugs now I've got a working perf command..
> 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_*?\.:]+)?
>
--
Dominique Martinet | Asmadeus
next prev parent reply other threads:[~2024-04-07 12:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 12:18 [PATCH 0/3] perf probe: Allow names to start with digits Dominique Martinet
2024-04-07 12:18 ` [PATCH 1/3] perf parse-events: pass parse_state to add_tracepoint Dominique Martinet
2024-04-07 12:18 ` [PATCH 2/3] perf parse-events: Add new 'fake_tp' parameter for tests Dominique Martinet
2024-04-07 12:18 ` [PATCH 3/3] perf parse: Allow names to start with digits Dominique Martinet
2024-04-07 12:38 ` Dominique Martinet [this message]
2024-04-07 18:32 ` Ian Rogers
2024-04-08 12:49 ` Dominique Martinet
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=ZhKTrUPbUnBviQYK@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).