Commit afbef30
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: 9c964ef ("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.com1 parent a5398bf commit afbef30
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3662 | 3662 | | |
3663 | 3663 | | |
3664 | 3664 | | |
3665 | | - | |
| 3665 | + | |
3666 | 3666 | | |
| 3667 | + | |
| 3668 | + | |
3667 | 3669 | | |
3668 | 3670 | | |
3669 | 3671 | | |
| |||
3676 | 3678 | | |
3677 | 3679 | | |
3678 | 3680 | | |
| 3681 | + | |
3679 | 3682 | | |
3680 | 3683 | | |
3681 | 3684 | | |
| |||
0 commit comments