aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event_intel_lbr.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-03-09 05:51:02 -0500
committerIngo Molnar <mingo@elte.hu>2010-03-10 07:23:39 -0500
commit63fb3f9b2312e131be5a0a2dddb63f2fb123db9b (patch)
treea5829092628864ae123e8facbf2ded545e0a55c6 /arch/x86/kernel/cpu/perf_event_intel_lbr.c
parentd80c7502ff63aa0d99d8c0c5803d28bbef67a74e (diff)
perf, x86: Fix LBR read-out
Don't decrement the TOS twice... Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: paulus@samba.org Cc: eranian@google.com Cc: robert.richter@amd.com Cc: fweisbec@gmail.com LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_intel_lbr.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_lbr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
index f278136bf918..df4c98e26c5b 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
@@ -129,7 +129,7 @@ static void intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc)
129 u64 tos = intel_pmu_lbr_tos(); 129 u64 tos = intel_pmu_lbr_tos();
130 int i; 130 int i;
131 131
132 for (i = 0; i < x86_pmu.lbr_nr; i++, tos--) { 132 for (i = 0; i < x86_pmu.lbr_nr; i++) {
133 unsigned long lbr_idx = (tos - i) & mask; 133 unsigned long lbr_idx = (tos - i) & mask;
134 union { 134 union {
135 struct { 135 struct {
@@ -162,7 +162,7 @@ static void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc)
162 u64 tos = intel_pmu_lbr_tos(); 162 u64 tos = intel_pmu_lbr_tos();
163 int i; 163 int i;
164 164
165 for (i = 0; i < x86_pmu.lbr_nr; i++, tos--) { 165 for (i = 0; i < x86_pmu.lbr_nr; i++) {
166 unsigned long lbr_idx = (tos - i) & mask; 166 unsigned long lbr_idx = (tos - i) & mask;
167 u64 from, to, flags = 0; 167 u64 from, to, flags = 0;
168 168