Re: [PATCH v2 7/7] perf test: Test pmu-events aliases
From: Jiri Olsa
Date: Tue Mar 17 2020 - 12:20:58 EST
On Tue, Mar 17, 2020 at 07:02:19PM +0800, John Garry wrote:
SNIP
> struct perf_pmu_test_event {
> struct pmu_event event;
> +
> + /* extra events for aliases */
> + const char *alias_str;
> +
> + /*
> + * Note: For when PublicDescription does not exist in the JSON, we
> + * will have no long_desc in pmu_event.long_desc, but long_desc may
> + * be set in the alias.
> + */
> + const char *alias_long_desc;
> };
> +
> static struct perf_pmu_test_event test_cpu_events[] = {
> {
> .event = {
> @@ -20,6 +31,8 @@ static struct perf_pmu_test_event test_cpu_events[] = {
> .desc = "L1 BTB Correction",
> .topic = "branch",
> },
> + .alias_str = "event=0x8a",
> + .alias_long_desc = "L1 BTB Correction",
> },
> {
> .event = {
> @@ -28,6 +41,8 @@ static struct perf_pmu_test_event test_cpu_events[] = {
> .desc = "L2 BTB Correction",
> .topic = "branch",
> },
> + .alias_str = "event=0x8b",
> + .alias_long_desc = "L2 BTB Correction",
> },
> {
> .event = {
> @@ -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?
jirka