perf_events, x86: Remove superflous MSR writes
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 10 Feb 2010 15:10:48 +0000 (16:10 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 26 Feb 2010 09:56:54 +0000 (10:56 +0100)
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 <a.p.zijlstra@chello.nl>
Cc: Arjan van de Ven <arjan@linux.intel.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_event.c

index ad096562d694e19275c231c455a06690ae7678f8..dd09ccc867d3d03b816492fe58661aee3fecdabd 100644 (file)
@@ -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;
 }