1
0
Fork 0
alistair23-linux/arch/x86/events
Kim Phillips 53644e59c1 perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag
commit f967140dfb upstream.

Enable the sampling check in kernel/events/core.c::perf_event_open(),
which returns the more appropriate -EOPNOTSUPP.

BEFORE:

  $ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true
  Error:
  The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (l3_request_g1.caching_l3_cache_accesses).
  /bin/dmesg | grep -i perf may provide additional information.

With nothing relevant in dmesg.

AFTER:

  $ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true
  Error:
  l3_request_g1.caching_l3_cache_accesses: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'

Fixes: c43ca5091a ("perf/x86/amd: Add support for AMD NB and L2I "uncore" counters")
Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20200311191323.13124-1-kim.phillips@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-18 07:17:53 +01:00
..
amd perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag 2020-03-18 07:17:53 +01:00
intel perf/x86/cstate: Add Tremont support 2020-03-05 16:43:37 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile perf/x86: Add MSR probe interface 2019-06-24 19:28:31 +02:00
core.c perf/x86/intel: Fix PT PMI handling 2020-01-12 12:21:36 +01:00
msr.c perf/x86/msr: Add Tremont support 2020-03-05 16:43:38 +01:00
perf_event.h perf/x86/amd: Constrain Large Increment per Cycle events 2020-02-24 08:36:52 +01:00
probe.c perf/x86: Add MSR probe interface 2019-06-24 19:28:31 +02:00
probe.h perf/x86: Add MSR probe interface 2019-06-24 19:28:31 +02:00