perf/x86/intel: Check PEBS status correctly
authorStephane Eranian <eranian@google.com>
Thu, 26 Nov 2020 11:09:22 +0000 (20:09 +0900)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 3 Dec 2020 09:00:26 +0000 (10:00 +0100)
commitff0286a43256e625276cba52504a2a20cecceda0
tree4b0e517db83ad158f76421592fe2aa66507b5ac0
parent4b70adf6f10f67f5cfe8ad737084e07e3e47e258
perf/x86/intel: Check PEBS status correctly

The kernel cannot disambiguate when 2+ PEBS counters overflow at the
same time. This is what the comment for this code suggests.  However,
I see the comparison is done with the unfiltered p->status which is a
copy of IA32_PERF_GLOBAL_STATUS at the time of the sample. This
register contains more than the PEBS counter overflow bits. It also
includes many other bits which could also be set.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20201126110922.317681-2-namhyung@kernel.org
arch/x86/events/intel/ds.c