perf/x86/amd/core: Refactor branch attributes
authorSandipan Das <sandipan.das@amd.com>
Thu, 11 Aug 2022 12:29:50 +0000 (17:59 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 26 Aug 2022 22:05:42 +0000 (00:05 +0200)
commit9603aa79e851c652f6da873205c92213af36b24f
treec4c6c782322529eb17ebf3a2b4f1ebc78e1f37e6
parentb40d0156f560932d14e3957579b6508f8d065260
perf/x86/amd/core: Refactor branch attributes

AMD processors that are capable of recording branches support either Branch
Sampling (BRS) or Last Branch Record (LBR). In preparation for adding Last
Branch Record Extension Version 2 (LbrExtV2) support, reuse the "branches"
capability to advertise information about both BRS and LBR but make the
"branch-brs" event exclusive to Family 19h processors that support BRS.

Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/ba4a4cde6db79b1c65c49834027bbdb8a915546b.1660211399.git.sandipan.das@amd.com
arch/x86/events/amd/core.c