[ltt-dev] [PATCH] Fix usage of trace_clock_freq_scale() as a multiplier

Benjamin Poirier benjamin.poirier at polymtl.ca
Thu Jul 30 09:26:05 EDT 2009


According to http://www.lttng.org/svn/trunk/lttv, svn revision 3150 commit
log: freq scale is now a divisor
---
 kernel/trace/trace-clock-32-to-64.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/trace-clock-32-to-64.c b/kernel/trace/trace-clock-32-to-64.c
index b1fdceb..701aeb1 100644
--- a/kernel/trace/trace-clock-32-to-64.c
+++ b/kernel/trace/trace-clock-32-to-64.c
@@ -158,10 +158,10 @@ static int __init precalc_stsc_interval(void)
 	u64 rem_freq, rem_interval;
 
 	precalc_expire =
-		__iter_div_u64_rem(HW_BITMASK,
-		 ((__iter_div_u64_rem(trace_clock_frequency(), HZ, &rem_freq)
-		     * trace_clock_freq_scale())
-		    << 1)
+		__iter_div_u64_rem(HW_BITMASK, (
+		  __iter_div_u64_rem(trace_clock_frequency(),
+		  HZ * trace_clock_freq_scale(), &rem_freq) << 1
+		 )
 		 - 1
 		 - (TC_EXPECTED_INTERRUPT_LATENCY * HZ / 1000), &rem_interval)
 		>> 1;
-- 
1.6.3.3





More information about the lttng-dev mailing list