mirror_ubuntu-kernels/tools/perf/arch/arm64/util
Jin Yao d2f327acc6 perf tools: Support pmu prefix for mem-load event
The perf_mem_events__name() can generate the mem-load event name.
It uses a variable 'mem_loads_name__init' to avoid generating the
event name every time (because perf_pmu__scan takes some time).

The perf_mem_events__name() assumes the pmu is "cpu" but it's not
correct for hybrid platform. For Alderlake, the pmu is "cpu_core" or
"cpu_atom"

Introduce a new parameter 'pmu_name' in perf_mem_events__name
to let the caller specify a pmu name.

Considering such event name is x86 specific, so move
perf_mem_events[] to arch/x86/util/mem-events.c.

We still keep the variable 'mem_loads_name__init' but it's only
used when pmu_name is NULL (compatible for original behavior). When
pmu_name is not NULL (e.g. "cpu_core"), this patch doesn't have
optimization. That can be implemented in follow up patch.

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-3-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-06-01 11:03:35 -03:00
..
arm64_exception_types.h perf kvm: Add kvm-stat for arm64 2020-11-04 09:42:41 -03:00
arm-spe.c perf arm-spe: Remove redundant checking for "full_auxtrace" 2021-05-25 09:50:02 -03:00
Build perf pmu: Add pmu_events_map__find() function to find the common PMU map for the system 2021-04-08 14:24:14 -03:00
dwarf-regs.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
header.c perf tools: Add arm64 version of get_cpuid() 2020-02-12 10:36:51 -03:00
kvm-stat.c perf tools: Fix a build error on arm64 with clang 2021-05-10 09:01:00 -03:00
machine.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
mem-events.c perf tools: Support pmu prefix for mem-load event 2021-06-01 11:03:35 -03:00
perf_regs.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
pmu.c perf arm64: Fix off-by-one directory paths. 2021-04-20 08:40:20 -03:00
tsc.c perf tsc: Add rdtsc() for Arm64 2020-09-22 13:44:16 -03:00
unwind-libdw.c perf libdw: Fix off-by 1 relative directory includes 2020-06-01 12:24:23 -03:00
unwind-libunwind.c perf arm64: Fix off-by-one directory paths. 2021-04-20 08:40:20 -03:00