summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/autoload.c
diff options
context:
space:
mode:
authorKan Liang <kan.liang@linux.intel.com>2025-03-14 20:26:58 +0300
committerPeter Zijlstra <peterz@infradead.org>2025-03-17 13:23:37 +0300
commit3cec9fd03543c1e2919f906353e5cba079ae0a7c (patch)
tree36b4ffa0b33a49fa8b401bbe1927748a1ce48211 /tools/testing/selftests/bpf/prog_tests/autoload.c
parentd57e94f5b891925e4f2796266eba31edd5a01903 (diff)
downloadlinux-3cec9fd03543c1e2919f906353e5cba079ae0a7c.tar.xz
perf/x86/lbr: Fix shorter LBRs call stacks for the system-wide mode
In the system-wide mode, LBR callstacks are shorter in comparison to the per-process mode. LBR MSRs are reset during a context switch in the system-wide mode. For the LBR call stack, the LBRs should be always saved/restored during a context switch. Use the space in task_struct to save/restore the LBR call stack data. For a system-wide event, it's unnecessagy to update the lbr_callstack_users for each threads. Add a variable in x86_pmu to indicate whether the system-wide event is active. Fixes: 76cb2c617f12 ("perf/x86/intel: Save/restore LBR stack during context switch") Reported-by: Andi Kleen <ak@linux.intel.com> Reported-by: Alexey Budankov <alexey.budankov@linux.intel.com> Debugged-by: Alexey Budankov <alexey.budankov@linux.intel.com> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250314172700.438923-5-kan.liang@linux.intel.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions