From: Dominique Martinet <asmadeus@codewreck.org>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
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: Sun, 3 Jul 2022 08:51:14 +0900 [thread overview]
Message-ID: <YsDZ8mTnCQzpejOM@codewreck.org> (raw)
In-Reply-To: <YsBosxs9TVB0aLrf@krava>
Jiri Olsa wrote on Sat, Jul 02, 2022 at 05:48:03PM +0200:
> > > > -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?
hmm, I'd love to but on my system I have no events that start with a
number unless I manually modprobe 9pnet (or 802154 stuff), so tests
would start failing for most people and I don't think we want that...
I have confirmed the following 'perf test "event parsing"' works iff
patch is applied and 9pnet loaded:
----
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 459afdb256a1..3d069fe9eb79 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -1941,6 +1941,11 @@ static const struct evlist_test test__events[] = {
.check = test__exclusive_group,
/* 7 */
},
+ {
+ .name = "9p:9p_client_req",
+ .check = test__checkevent_tracepoint,
+ /* 8 */
+ },
};
static const struct evlist_test test__events_pmu[] = {
----
not sure if there'd be any other way of testing, there's nothing else in
'perf list' that starts with a number.
--
Dominique
next prev parent reply other threads:[~2022-07-02 23:51 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
2022-07-02 23:51 ` Dominique Martinet [this message]
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=YsDZ8mTnCQzpejOM@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--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=olsajiri@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.