]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/amd/ibs: Fix raw sample data accumulation
authorKim Phillips <kim.phillips@amd.com>
Tue, 8 Sep 2020 21:47:38 +0000 (16:47 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 10 Sep 2020 09:19:35 +0000 (11:19 +0200)
commit4f7481c13701a35b468a0697b92b77198327cab9
tree5b87936f33d72a49cec5541f4fe15573277fb0bf
parent4a935b76ca7d9baae708bcae202b2ff3711cc40c
perf/x86/amd/ibs: Fix raw sample data accumulation

Neither IbsBrTarget nor OPDATA4 are populated in IBS Fetch mode.
Don't accumulate them into raw sample user data in that case.

Also, in Fetch mode, add saving the IBS Fetch Control Extended MSR.

Technically, there is an ABI change here with respect to the IBS raw
sample data format, but I don't see any perf driver version information
being included in perf.data file headers, but, existing users can detect
whether the size of the sample record has reduced by 8 bytes to
determine whether the IBS driver has this fix.

Fixes: 52fb3af0cb45 ("perf/x86/amd/ibs: Update IBS MSRs and feature definitions")
Reported-by: Stephane Eranian <stephane.eranian@google.com>
Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20200908214740.18097-6-kim.phillips@amd.com
arch/x86/events/amd/ibs.c
arch/x86/include/asm/msr-index.h