Skip to content

Commit

Permalink
perf_events, x86: Remove spurious counter reset from x86_pmu_enable()
Browse files Browse the repository at this point in the history
At enable time the counter might still have a ->idx pointing to
a previously occupied location that might now be taken by
another event. Resetting the counter at that location with data
from this event will destroy the other counter's count.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <20100127221122.261477183@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 29, 2010
1 parent 452a339 commit 18c01f8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1762,9 +1762,6 @@ static int x86_pmu_enable(struct perf_event *event)
cpuc->n_events = n;
cpuc->n_added = n - n0;

if (hwc->idx != -1)
x86_perf_event_set_period(event, hwc, hwc->idx);

return 0;
}

Expand Down

0 comments on commit 18c01f8

Please sign in to comment.