linux/arch/x86/events/intel
Kan Liang afbef30149 perf/x86/intel: Set PERF_ATTACH_SCHED_CB for large PEBS and LBR
To supply a PID/TID for large PEBS, it requires flushing the PEBS buffer
in a context switch.

For normal LBRs, a context switch can flip the address space and LBR
entries are not tagged with an identifier, we need to wipe the LBR, even
for per-cpu events.

For LBR callstack, save/restore the stack is required during a context
switch.

Set PERF_ATTACH_SCHED_CB for the event with large PEBS & LBR.

Fixes: 9c964efa43 ("perf/x86/intel: Drain the PEBS buffer during context switches")
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20201130193842.10569-2-kan.liang@linux.intel.com
2021-03-06 12:52:44 +01:00
..
bts.c perf/x86: Replace zero-length array with flexible-array 2020-05-19 20:34:16 +02:00
core.c perf/x86/intel: Set PERF_ATTACH_SCHED_CB for large PEBS and LBR 2021-03-06 12:52:44 +01:00
cstate.c Merge remote-tracking branch 'origin/master' into perf/core 2020-11-26 13:16:55 +01:00
ds.c perf/x86/intel: Add perf core PMU support for Sapphire Rapids 2021-02-01 15:31:37 +01:00
knc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lbr.c Perf updates: 2020-12-14 17:34:12 -08:00
Makefile perf/x86/rapl: Move RAPL support to common x86 code 2020-05-28 07:58:55 +02:00
p4.c perf_event: Add support for LSM and SELinux checks 2019-10-17 21:31:55 +02:00
p6.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
pt.c perf/x86/intel/pt: Drop pointless NULL assignment. 2020-04-30 20:14:36 +02:00
pt.h perf/x86/intel/pt: Prevent redundant WRMSRs 2019-11-13 11:06:18 +01:00
uncore_nhmex.c perf/x86/intel/uncore: Correct fixed counter index check for NHM 2018-05-31 12:36:28 +02:00
uncore_snb.c perf/x86/intel/uncore: Store the logical die id instead of the physical die id. 2021-01-14 11:20:13 +01:00
uncore_snbep.c perf/x86/intel/uncore: With > 8 nodes, get pci bus die id from NUMA info 2021-01-14 11:20:14 +01:00
uncore.c perf/x86/intel/uncore: Store the logical die id instead of the physical die id. 2021-01-14 11:20:13 +01:00
uncore.h perf/x86/intel/uncore: Store the logical die id instead of the physical die id. 2021-01-14 11:20:13 +01:00