]> 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)
commit4e487a2ef041ccca63a703d00219e1ae7df3851b
tree5b87936f33d72a49cec5541f4fe15573277fb0bf
parentcf185e7af10bd37cc2549bc765ec9cc74919f382
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: 732ef2b76a17 ("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