perf tools: Check mem-loads auxiliary event
authorJin Yao <yao.jin@linux.intel.com>
Thu, 27 May 2021 00:16:03 +0000 (08:16 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 1 Jun 2021 14:02:56 +0000 (11:02 -0300)
commitddc11da5eb37e27a4b66cddcaf11233ef51b3a79
treed66a6b6b411a14b577c662a1f2e74b152df835cd
parenta483e64c0b62e93a772cbc96f32bad885586fad7
perf tools: Check mem-loads auxiliary event

For some platforms, an auxiliary event has to be enabled
simultaneously with the load latency event.

For Alderlake, the auxiliary event is created in "cpu_core" pmu.

So first we need to check the existing of "cpu_core" pmu
and then check if this pmu has auxiliary event.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210527001610.10553-2-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/mem-events.c