summaryrefslogtreecommitdiff
path: root/arch/x86/events/utils.c
diff options
context:
space:
mode:
authorSandipan Das <sandipan.das@amd.com>2022-08-11 15:29:55 +0300
committerPeter Zijlstra <peterz@infradead.org>2022-08-27 01:05:43 +0300
commitf4f925dae7419fc7a10af539c073871927ce3a24 (patch)
tree88294aa43aad7a0ebedabb85612874d730a3e455 /arch/x86/events/utils.c
parentca5b7c0d9621702e107c83216316a6d722878b64 (diff)
downloadlinux-f4f925dae7419fc7a10af539c073871927ce3a24.tar.xz
perf/x86/amd/lbr: Add LbrExtV2 hardware branch filter support
If AMD Last Branch Record Extension Version 2 (LbrExtV2) is detected, convert the requested branch filter (PERF_SAMPLE_BRANCH_* flags) to the corresponding hardware filter value and stash it in the event data when a branch stack is requested. The hardware filter value is also saved in per-CPU areas for use during event scheduling. Hardware filtering is provided by the LBR Branch Select register. It has bits which when set, suppress recording of the following types of branches: * CPL = 0 (Kernel only) * CPL > 0 (Userspace only) * Conditional Branches * Near Relative Calls * Near Indirect Calls * Near Returns * Near Indirect Jumps (excluding Near Indirect Calls and Near Returns) * Near Relative Jumps (excluding Near Relative Calls) * Far Branches Signed-off-by: Sandipan Das <sandipan.das@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/9336af5c9785b8e14c62220fc0e6cfb10ab97de3.1660211399.git.sandipan.das@amd.com
Diffstat (limited to 'arch/x86/events/utils.c')
0 files changed, 0 insertions, 0 deletions