[ltt-dev] [PATCH] Fix usage of trace_clock_freq_scale() as a multiplier
Mathieu Desnoyers
compudj at krystal.dyndns.org
Thu Jul 30 14:53:17 EDT 2009
* Benjamin Poirier (benjamin.poirier at polymtl.ca) wrote:
> 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
> + )
Ah, right. Although all architectures currently use a freq_scale of 1 ;)
It will be useful if we ever want to express fraction of cycles/s to
improve clock frequency precision...
Will merge, thanks !
Mathieu
> - 1
> - (TC_EXPECTED_INTERRUPT_LATENCY * HZ / 1000), &rem_interval)
> >> 1;
> --
> 1.6.3.3
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
More information about the lttng-dev
mailing list