diff options
| author | Dapeng Mi <dapeng1.mi@linux.intel.com> | 2026-06-16 12:46:49 +0800 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-06-30 11:46:06 +0200 |
| commit | 170cc6b02e3d5203ccaa49ffea1ee5a7ab08c885 (patch) | |
| tree | 1708df87d217f302320399f1f71cdcbb72f44f5b /tools/lib/python | |
| parent | 3c4ec9b2a5db56b60127bfaf933ecdeea7a1f10a (diff) | |
perf/x86/intel: Fallback to sw branch type decoding if no hw decoding
intel_pmu_lbr_filter() currently assumes arch-LBR provides hardware
branch-type decoding and skips software decoding on that path.
However, arch-LBR may not always expose branch-type information. In
that case, treating entries as hardware-decoded can misclassify sampled
branches (for example, defaulting to JCC), which breaks branch-type
filtering results.
Fix this by using software branch-type decoding when hardware
branch-type decoding is unavailable (that is, when x86_lbr_type is not
enabled). This keeps branch classification and filtering behavior
correct across arch-LBR configurations.
Since x86_lbr_type is only set to true when arch-LBR is supported,
it's unnecessary to check if the CPU has the arch-LBR feature.
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260616044654.3468742-4-dapeng1.mi@linux.intel.com
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
