Re: [PATCH v2 2/7] perf jevents: Support test events folder

From: Jiri Olsa
Date: Tue Mar 17 2020 - 12:21:06 EST


On Tue, Mar 17, 2020 at 07:02:14PM +0800, John Garry wrote:
> With the goal of supporting pmu-events test case, introduce support for a
> test events folder.
>
> These test events can be used for testing generation of pmu-event tables
> and alias creation for any arch.
>
> When running the pmu-events test case, these test events will be used
> as the platform-agnostic events, so aliases can be created per-PMU and
> validated against known expected values.
>
> To support the test events, add a "testcpu" entry in pmu_events_map[].
> The pmu-events test will be able to lookup the events map for "testcpu",
> to verify the generated tables against expected values.
>
> The resultant generated pmu-events.c will now look like the following:

can't compile this one:

HOSTCC pmu-events/jevents.o
pmu-events/jevents.c: In function âmainâ:
pmu-events/jevents.c:1195:3: error: âretâ undeclared (first use in this function)
1195 | ret = 1;
| ^~~
pmu-events/jevents.c:1195:3: note: each undeclared identifier is reported only once for each function it appears in
pmu-events/jevents.c:1196:3: error: label âout_free_mapfileâ used but not defined
1196 | goto out_free_mapfile;
| ^~~~
mv: cannot stat 'pmu-events/.jevents.o.tmp': No such file or directory
make[3]: *** [/home/jolsa/kernel/linux-perf/tools/build/Makefile.build:97: pmu-events/jevents.o] Error 1
make[2]: *** [Makefile.perf:619: pmu-events/jevents-in.o] Error 2
make[1]: *** [Makefile.perf:225: sub-make] Error 2
make: *** [Makefile:70: all] Error 2


jirka