summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/msr-index.h
diff options
context:
space:
mode:
authorKan Liang <kan.liang@linux.intel.com>2023-10-25 23:16:20 +0300
committerPeter Zijlstra <peterz@infradead.org>2023-10-27 16:05:09 +0300
commit85846b27072defc7ab3dcee7ff36563a040079dc (patch)
tree287c12b68fe5e265b16b874576af953d44c0a57f /arch/x86/include/asm/msr-index.h
parent571d91dcadfa3cef499010b4eddb9b58b0da4d24 (diff)
downloadlinux-85846b27072defc7ab3dcee7ff36563a040079dc.tar.xz
perf/x86: Add PERF_X86_EVENT_NEEDS_BRANCH_STACK flag
Currently, branch_sample_type !=0 is used to check whether a branch stack setup is required. But it doesn't check the sample type, unnecessary branch stack setup may be done for a counting event. E.g., perf record -e "{branch-instructions,branch-misses}:S" -j any Also, the event only with the new PERF_SAMPLE_BRANCH_COUNTERS branch sample type may not require a branch stack setup either. Add a new flag NEEDS_BRANCH_STACK to indicate whether the event requires a branch stack setup. Replace the needs_branch_stack() by checking the new flag. The counting event check is implemented here. The later patch will take the new PERF_SAMPLE_BRANCH_COUNTERS into account. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20231025201626.3000228-2-kan.liang@linux.intel.com
Diffstat (limited to 'arch/x86/include/asm/msr-index.h')
0 files changed, 0 insertions, 0 deletions