mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-04 14:02:55 +00:00
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> |
||
|---|---|---|
| .. | ||
| book3s_hcalls.h | ||
| book3s_hv_exits.h | ||
| Build | ||
| dwarf-regs.c | ||
| event.c | ||
| evsel.c | ||
| header.c | ||
| kvm-stat.c | ||
| machine.c | ||
| mem-events.c | ||
| perf_regs.c | ||
| skip-callchain-idx.c | ||
| sym-handling.c | ||
| unwind-libdw.c | ||
| unwind-libunwind.c | ||
| utils_header.h | ||