[ltt-dev] [UST PATCH] Fix variable declaration of the clock source
Mathieu Desnoyers
compudj at krystal.dyndns.org
Fri Jan 14 11:50:52 EST 2011
Ouch, this means that UST 0.10 uses the clocksource "0", which is
CLOCK_REALTIME; not exactly what we'd expect. This calls for a 0.11
release soon to fix this.
The fix is not exactly correct though, I would rather do:
in clock.h:
extern int ust_clock_source;
in tracectl.c:
int ust_clock_source;
So that it is clear where the variable is held.
Thanks,
Mathieu
* David Goulet (david.goulet at polymtl.ca) wrote:
> The ust_clock_source was static in clock.h header file.
> Thus, tracectl.c was not able to modify that variable for
> the trace clock read function. Bad timestamp was always
> returned if CLOCK_TRACE was not available.
>
> Signed-off-by: David Goulet <david.goulet at polymtl.ca>
> ---
> include/ust/clock.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/ust/clock.h b/include/ust/clock.h
> index ac0a2d5..db8ceb4 100644
> --- a/include/ust/clock.h
> +++ b/include/ust/clock.h
> @@ -49,7 +49,7 @@ union lttng_timespec {
> };
> #endif /* __i386__ || __x86_64__ */
>
> -static int ust_clock_source;
> +int ust_clock_source;
>
> /* Choosing correct trace clock */
> #if __PPC__
> --
> 1.7.3.5
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list