perf/x86/intel: Export mem events only if there's PEBs support
Memory events depends on PEBs support and access to LDLAT msr,
but we display them in /sys/devices/cpu/events even if the cpu
does not provide those, like for KVM guests.
That brings the false assumption that those events should
be available, while they fail event to open.
Separating the mem-* events attributes and merging them
with cpu_events only if there's PEBs support detected.
We could also check if LDLAT msr is available, but the
PEBs check seems to cover the need now.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
1 file changed