From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: mingo@elte.hu, eranian@google.com
Cc: linux-kernel@vger.kernel.org, Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 4/4] perf_events: x86: Remove spurious counter reset from x86_pmu_enable()
Date: Wed, 27 Jan 2010 23:07:49 +0100 [thread overview]
Message-ID: <20100127221122.261477183@chello.nl> (raw)
In-Reply-To: <20100127220745.027096123@chello.nl>
[-- Attachment #1: perf-cleanup-enable.patch --]
[-- Type: text/plain, Size: 852 bytes --]
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;
}
--
next prev parent reply other threads:[~2010-01-27 22:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 22:07 [PATCH 0/4] perf x86 fixes Peter Zijlstra
2010-01-27 22:07 ` [PATCH 1/4] perf_events: x86: Fix event constraint masks Peter Zijlstra
2010-01-29 9:29 ` [tip:perf/core] perf_events, " tip-bot for Peter Zijlstra
2010-01-27 22:07 ` [PATCH 2/4] perf_events: x86: Clean up hw_perf_*_all() implementation Peter Zijlstra
2010-01-29 9:30 ` [tip:perf/core] perf_events, " tip-bot for Peter Zijlstra
2010-01-27 22:07 ` [PATCH 3/4] perf_events: x86: Implement westmere support Peter Zijlstra
2010-01-29 9:30 ` [tip:perf/core] perf_events, x86: Implement Intel Westmere support tip-bot for Peter Zijlstra
2010-01-27 22:07 ` Peter Zijlstra [this message]
2010-01-29 9:30 ` [tip:perf/core] perf_events, x86: Remove spurious counter reset from x86_pmu_enable() tip-bot for Peter Zijlstra
2010-01-29 7:55 ` [PATCH 0/4] perf x86 fixes Ingo Molnar
2010-01-29 8:04 ` [PATCH 5/4] perf_events: Fix sample_period transfer on inherit Peter Zijlstra
2010-01-29 9:30 ` [tip:perf/core] " tip-bot for Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100127221122.261477183@chello.nl \
--to=a.p.zijlstra@chello.nl \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome