Commit-ID: 963988262c3c8f4234f64a0dde59446a295e07bb Gitweb: http://git.kernel.org/tip/963988262c3c8f4234f64a0dde59446a295e07bb Author: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> AuthorDate: Wed, 24 Nov 2010 18:55:29 +0100 Committer: Ingo Molnar <mingo@xxxxxxx> CommitDate: Fri, 26 Nov 2010 15:14:55 +0100 perf: Ignore non-sampling overflows Some arch implementations call perf_event_overflow() by 'accident', ignore this. Reported-by: Francis Moreau <francis.moro@xxxxxxxxx> Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@xxxxxxx> --- kernel/perf_event.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 98c5549..af1e63f 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 { -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html