From: Peter Zijlstra Date: Wed, 10 Feb 2010 15:10:48 +0000 (+0100) Subject: perf_events, x86: Remove superflous MSR writes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6667661df4bc76083edf1e08831c20f64429709d;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git perf_events, x86: Remove superflous MSR writes We re-program the event control register every time we reset the count, this appears to be superflous, hence remove it. Signed-off-by: Peter Zijlstra Cc: Arjan van de Ven LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index ad096562d694..dd09ccc867d3 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -2009,9 +2009,6 @@ static int intel_pmu_save_and_restart(struct perf_event *event) x86_perf_event_update(event, hwc, idx); ret = x86_perf_event_set_period(event, hwc, idx); - if (event->state == PERF_EVENT_STATE_ACTIVE) - intel_pmu_enable_event(hwc, idx); - return ret; }