Re: [PATCH v2 7/7] perf test: Test pmu-events aliases

From: John Garry
Date: Fri Mar 20 2020 - 05:24:48 EST


On 19/03/2020 18:36, Arnaldo Carvalho de Melo wrote:
Em Tue, Mar 17, 2020 at 06:07:30PM +0100, Jiri Olsa escreveu:
On Tue, Mar 17, 2020 at 04:41:04PM +0000, John Garry wrote:
On 17/03/2020 16:20, Jiri Olsa wrote:
On Tue, Mar 17, 2020 at 07:02:19PM +0800, John Garry wrote:
@@ -36,6 +51,8 @@ static struct perf_pmu_test_event test_cpu_events[] = {
.desc = "Number of segment register loads",
.topic = "other",
},
+ .alias_str = "umask=0x80,(null)=0x30d40,event=0x6",

ah so we are using other pmus because of the format definitions

why is there the '(null)' in there?

Well this is just coming from the generated alias string in the pmu code,
and it does not seem to be handling "period" argument properly. It needs to
be checked.
nice, it found first issue already ;-)

thanks


Applied the series to perf/core, good job! What about the fix for the
above (null) problem?

So I had started to look at that, but then the codepath lead into the lex parsing, which I am not familiar with.

So from when we parse the event terms in parse_events_terms(), we get 3x terms:
config=umask, then newval=umask=0x80
confg=(null), then newval=umask=0x80,(null)=x030d40
config=event, then newval=umask=0x80,(null)=x030d40,event=0x6

I can continue to look. Maybe jirka has an idea on this and what happens in the lex parsing.

Cheers,
John