lkml.org 
[lkml]   [2010]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 4/4] 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>
---
arch/x86/kernel/cpu/perf_event.c | 3 ---
1 file changed, 3 deletions(-)

Index: linux-2.6/arch/x86/kernel/cpu/perf_event.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/perf_event.c
+++ linux-2.6/arch/x86/kernel/cpu/perf_event.c
@@ -1769,9 +1769,6 @@ static int x86_pmu_enable(struct perf_ev
cpuc->n_events = n;
cpuc->n_added = n - n0;

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

--



\
 
 \ /
  Last update: 2010-01-27 23:17    [W:0.090 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site