From: Peter Zijlstra Date: Wed, 24 Nov 2010 17:55:29 +0000 (+0100) Subject: perf: Ignore non-sampling overflows X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=963988262c3c8f4234f64a0dde59446a295e07bb;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git perf: Ignore non-sampling overflows Some arch implementations call perf_event_overflow() by 'accident', ignore this. Reported-by: Francis Moreau Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 98c5549c8e29..af1e63f249f3 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -4240,6 +4240,13 @@ static int __perf_event_overflow(struct perf_event *event, int nmi, struct hw_perf_event *hwc = &event->hw; 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) { hwc->interrupts++; } else {