perf/x86/amd: Add branch-brs helper event for Fam19h BRS
authorStephane Eranian <eranian@google.com>
Tue, 22 Mar 2022 22:15:08 +0000 (15:15 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 Apr 2022 08:24:37 +0000 (10:24 +0200)
commit44175993efbae04e8b2d7f7795ff512c3a726db0
tree367733796be5c8a0bb9361dbadf3067d124f32d2
parentada543459cab7f653dcacdaba4011a8bb19c627c
perf/x86/amd: Add branch-brs helper event for Fam19h BRS

Add a pseudo event called branch-brs to help use the FAM Fam19h
Branch Sampling feature (BRS). BRS samples taken branches, so it is best used
when sampling on a retired taken branch event (0xc4) which is what BRS
captures.  Instead of trying to remember the event code or actual event name,
users can simply do:

$ perf record -b -e cpu/branch-brs/ -c 1000037 .....

Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220322221517.2510440-5-eranian@google.com
arch/x86/events/amd/core.c