Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -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 {