mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

On the Intel Sapphire Rapids server, an auxiliary event has to be
enabled simultaneously with the load latency event to retrieve complete
Memory Info.
Add X86 specific perf_mem_events__name() to handle the auxiliary event.
- Users are only interested in the samples of the mem-loads event.
Sample read the auxiliary event.
- The auxiliary event must be in front of the load latency event in a
group. Assume the second event to sample if the auxiliary event is the
leader.
- Add a weak is_mem_loads_aux_event() to check the auxiliary event for
X86. For other ARCHs, it always return false.
Parse the unique event name, mem-loads-aux, for the auxiliary event.
Committer notes:
According to 61b985e3e7
("perf/x86/intel: Add perf core PMU
support for Sapphire Rapids"), ENODATA is only returned by
sys_perf_event_open() when used with these auxiliary events, with this
in evsel__open_strerror():
case ENODATA:
return scnprintf(msg, size, "Cannot collect data source with the load latency event alone. "
"Please add an auxiliary event in front of the load latency event.");
This is Ok at this point in time, but fragile long term, I pointed this
out in the e-mail thread, requesting a follow up patch to check if
ENODATA is really for this specific case.
Fixed up sizeof(MEM_LOADS_AUX_NAME) bug pointed out by Namhyung.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20210205152648.GC920417@kernel.org
Link: http://lore.kernel.org/lkml/1612296553-21962-3-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
21 lines
539 B
Text
21 lines
539 B
Text
perf-y += header.o
|
|
perf-y += tsc.o
|
|
perf-y += pmu.o
|
|
perf-y += kvm-stat.o
|
|
perf-y += perf_regs.o
|
|
perf-y += topdown.o
|
|
perf-y += machine.o
|
|
perf-y += event.o
|
|
perf-y += evlist.o
|
|
perf-y += mem-events.o
|
|
|
|
perf-$(CONFIG_DWARF) += dwarf-regs.o
|
|
perf-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o
|
|
|
|
perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
|
|
perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
|
|
|
|
perf-$(CONFIG_AUXTRACE) += auxtrace.o
|
|
perf-$(CONFIG_AUXTRACE) += archinsn.o
|
|
perf-$(CONFIG_AUXTRACE) += intel-pt.o
|
|
perf-$(CONFIG_AUXTRACE) += intel-bts.o
|