diff options
| author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-01-27 17:07:49 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-01-29 03:01:49 -0500 |
| commit | 18c01f8abff51e4910cc5ffb4b710e8c6eea60c9 (patch) | |
| tree | 0d1430eeb579c21365db515c89edbf8871e1ecd7 | |
| parent | 452a339a976e7f782c786eb3f73080401e2fa3a6 (diff) | |
perf_events, x86: Remove spurious counter reset from x86_pmu_enable()
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>
| -rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 3fac0bfc2dee..518eb3e39577 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
| @@ -1762,9 +1762,6 @@ static int x86_pmu_enable(struct perf_event *event) | |||
| 1762 | cpuc->n_events = n; | 1762 | cpuc->n_events = n; |
| 1763 | cpuc->n_added = n - n0; | 1763 | cpuc->n_added = n - n0; |
| 1764 | 1764 | ||
| 1765 | if (hwc->idx != -1) | ||
| 1766 | x86_perf_event_set_period(event, hwc, hwc->idx); | ||
| 1767 | |||
| 1768 | return 0; | 1765 | return 0; |
| 1769 | } | 1766 | } |
| 1770 | 1767 | ||
