Skip to content

Commit 9f6b28d

Browse files
committed
Merge tag 'perf-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Thomas Gleixner: "Two fixes for performance monitoring on X86: - Add recursion protection to another callchain invoked from x86_pmu_stop() which can recurse back into x86_pmu_stop(). The first attempt to fix this missed this extra code path. - Use the already filtered status variable to check for PEBS counter overflow bits and not the unfiltered full status read from IA32_PERF_GLOBAL_STATUS which can have unrelated bits check which would be evaluated incorrectly" * tag 'perf-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Check PEBS status correctly perf/x86/intel: Fix a warning on x86_pmu_stop() with large PEBS
2 parents 592d9a0 + fc17db8 commit 9f6b28d

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

arch/x86/events/intel/ds.c

Lines changed: 2 additions & 2 deletions
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;
@@ -1940,7 +1940,7 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs, struct perf_sample_d
19401940
if (error[bit]) {
19411941
perf_log_lost_samples(event, error[bit]);
19421942

1943-
if (perf_event_account_interrupt(event))
1943+
if (iregs && perf_event_account_interrupt(event))
19441944
x86_pmu_stop(event, 0);
19451945
}
19461946

0 commit comments

Comments
 (0)