aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-11-24 12:55:29 -0500
committerIngo Molnar <mingo@elte.hu>2010-11-26 09:14:55 -0500
commit963988262c3c8f4234f64a0dde59446a295e07bb (patch)
tree4bdb97b340fe0432f7259bfcc7b64b4bc8d65c2d /kernel/perf_event.c
parent5d508e820a23d9b6e8a149dfaa8ba5cbedf3d95c (diff)
perf: Ignore non-sampling overflows
Some arch implementations call perf_event_overflow() by 'accident', ignore this. Reported-by: Francis Moreau <francis.moro@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c7
1 files changed, 7 insertions, 0 deletions
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,
4240 struct hw_perf_event *hwc = &event->hw; 4240 struct hw_perf_event *hwc = &event->hw;
4241 int ret = 0; 4241 int ret = 0;
4242 4242
4243 /*
4244 * Non-sampling counters might still use the PMI to fold short
4245 * hardware counters, ignore those.
4246 */
4247 if (unlikely(!is_sampling_event(event)))
4248 return 0;
4249
4243 if (!throttle) { 4250 if (!throttle) {
4244 hwc->interrupts++; 4251 hwc->interrupts++;
4245 } else { 4252 } else {