mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-12 07:34:08 +08:00
perf_event: x86: Optimize x86_pmu_disable()
x86_pmu_disable() removes the event from the cpuc->event_list[], however since an event can only be on that list once, stop looking after we found it. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
c933c1a603
commit
6c9687abeb
@ -1884,6 +1884,7 @@ static void x86_pmu_disable(struct perf_event *event)
|
|||||||
cpuc->event_list[i-1] = cpuc->event_list[i];
|
cpuc->event_list[i-1] = cpuc->event_list[i];
|
||||||
|
|
||||||
--cpuc->n_events;
|
--cpuc->n_events;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
perf_event_update_userpage(event);
|
perf_event_update_userpage(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user