aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-01-25 05:57:25 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-29 03:01:43 -0500
commit6c9687abeb24d5b7aae7db5be070c2139ad29e29 (patch)
tree7f51feb24627f1b8e81805aab9c727bbff92c2bd /arch/x86/kernel/cpu/perf_event.c
parentc933c1a603d5bf700ddce79216c1be0ec3bc0e6c (diff)
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>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 33c889ff21ae..66de282ad2fb 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1884,6 +1884,7 @@ static void x86_pmu_disable(struct perf_event *event)
1884 cpuc->event_list[i-1] = cpuc->event_list[i]; 1884 cpuc->event_list[i-1] = cpuc->event_list[i];
1885 1885
1886 --cpuc->n_events; 1886 --cpuc->n_events;
1887 break;
1887 } 1888 }
1888 } 1889 }
1889 perf_event_update_userpage(event); 1890 perf_event_update_userpage(event);