]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/intel: Export mem events only if there's PEBS support
authorJiri Olsa <jolsa@redhat.com>
Thu, 6 Sep 2018 13:57:48 +0000 (15:57 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 16 Oct 2018 15:29:07 +0000 (17:29 +0200)
commit94f2b450e29fc90684332d495c7054eb6ac23de2
treebe9ce80570d669eee28ee4d9ed7ba7216f2a2192
parent5c832c89738b5f58ab5b650d46b5ecc5a62031ba
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>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/20180906135748.GC9577@krava
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/core.c
arch/x86/events/intel/core.c