[lttng-dev] background information about LTTng timestamps

Mathieu Desnoyers compudj at krystal.dyndns.org
Thu Jan 26 15:19:23 EST 2012


* Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
> * Sébastien Barthélémy (barthelemy at crans.org) wrote:
> > I your aae88c703374f4b1fbb8a5e7e95591bf8ce3e837 commit you changed
> > 
> > tsc_bits from 32 to 27 in liblttng-ust/ltt-ring-buffer-client.h
> > 
> > Would not that alone have fixed the problem?
> > As explained in a previous email, I think, we were storing the bits
> > 32..64 instead of 27..59 in last_tsc.
> > 
> > Thus missing 2**5 overflows.
> > 
> > What do you think?
> 
> I think it's almost certainly it. I'll let you know after some more
> testing.

Yep, tested and confirmed. I fixed both LTTng-modules and LTTng-UST
which had the same issue.

lttng-modules:

commit a2ef1c035ae3166f967113cb0ddec535465e694c
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date:   Thu Jan 26 15:13:55 2012 -0500

    Properly fix the timekeeping overflow detection
    
    The underlying issue was a mismatch between the ring buffer
    configuration description of the number of clock bits (32) saved and the
    actual number used (27).
    
    Introduce LTTNG_COMPACT_EVENT_BITS and LTTNG_COMPACT_TSC_BITS across the
    code to remove all hardcoded instances of these values to ensure this
    kind of mistake does not happen again.
    
    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
    Reported-by: Sébastien Barthélémy <barthelemy at crans.org>


lttng-ust:

commit 79dfbf429c229ef733c5d8691a681edb91bee871
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date:   Thu Jan 26 15:12:51 2012 -0500

    Properly fix the timekeeping overflow detection
    
    The underlying issue was a mismatch between the ring buffer
    configuration description of the number of clock bits (32) saved and the
    actual number used (27).
    
    Introduce LTTNG_COMPACT_EVENT_BITS and LTTNG_COMPACT_TSC_BITS across the
    code to remove all hardcoded instances of these values to ensure this
    kind of mistake does not happen again.
    
    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
    Reported-by: Sébastien Barthélémy <barthelemy at crans.org>

Thanks !

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list