Skip to contentSkip to conversation

perf_counter: x86: Set the period in the intel overflow handler

tip:perfcounters/core tip-bot for Peter Zijlstra 1 participant 1 message Jun 17, 2009 x86

lore
Share & tools
lore
#0 lore raw
Commit-ID:  60f916dee612130c9977a8edd4abee98334202ba
Gitweb:     http://git.kernel.org/tip/60f916dee612130c9977a8edd4abee98334202ba
Author:     Peter Zijlstra <[email protected]>
AuthorDate: Mon, 15 Jun 2009 19:00:20 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 17 Jun 2009 19:23:52 +0200

perf_counter: x86: Set the period in the intel overflow handler

Commit 9e350de37ac960 ("perf_counter: Accurate period data") missed a spot, which caused all Intel-PMU samples to have a period of 0.

This broke auto-freq sampling.

Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>

LKML-Reference: <new-submission>

---
 arch/x86/kernel/cpu/perf_counter.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/cpu/perf_counter.c +2 -0
index e8c68a5..ce1ae3f 100644
@@ -1224,6 +1224,8 @@ again:
 		if (!intel_pmu_save_and_restart(counter))
 			continue;
 
+		data.period = counter->hw.last_period;
+
 		if (perf_counter_overflow(counter, 1, &data))
 			intel_pmu_disable_counter(&counter->hw, bit);
 	}