Skip to content

Commit fc17db8

Browse files
Stephane EranianPeter Zijlstra
authored andcommitted
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 <[email protected]> Signed-off-by: Stephane Eranian <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 5debf02 commit fc17db8

File tree

1 file changed

+1
-1
lines changed
  • arch/x86/events/intel

1 file changed

+1
-1
lines changed

arch/x86/events/intel/ds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs, struct perf_sample_d
19161916
* that caused the PEBS record. It's called collision.
19171917
* If collision happened, the record will be dropped.
19181918
*/
1919-
if (p->status != (1ULL << bit)) {
1919+
if (pebs_status != (1ULL << bit)) {
19201920
for_each_set_bit(i, (unsigned long *)&pebs_status, size)
19211921
error[i]++;
19221922
continue;

0 commit comments

Comments
 (0)