Commit 96398826 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

perf: Ignore non-sampling overflows

Some arch implementations call perf_event_overflow() by 'accident',
ignore this.
Reported-by: default avatarFrancis Moreau <francis.moro@gmail.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 5d508e82
...@@ -4240,6 +4240,13 @@ static int __perf_event_overflow(struct perf_event *event, int nmi, ...@@ -4240,6 +4240,13 @@ static int __perf_event_overflow(struct perf_event *event, int nmi,
struct hw_perf_event *hwc = &event->hw; struct hw_perf_event *hwc = &event->hw;
int ret = 0; int ret = 0;
/*
* Non-sampling counters might still use the PMI to fold short
* hardware counters, ignore those.
*/
if (unlikely(!is_sampling_event(event)))
return 0;
if (!throttle) { if (!throttle) {
hwc->interrupts++; hwc->interrupts++;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment