[lttng-dev] Timestamps in kernel tracing with LTTng
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Wed Nov 14 10:21:12 EST 2012
* Vince Do (blackhole37 at gmail.com) wrote:
> Hello,
>
> I was wondering if you can give me more information on how LTTng the
> timestamps are taken for a kernel trace, I have read in this article
> (Combined Tracing of the Kernel and Applications with LTTng at Linux
> Symposium 2009) that TSC and the command rdtsc are used, but the article is
> old (2009) and I would like to know if there are been any changes.
lttng uses the Linux kernel CLOCK_MONOTONIC clock, read through
clock_gettime() in user-space, and from ktime_get() in the kernel.
On x86 systems where TSC are synchronized and constant, it uses rdtsc,
scales that value to nanoseconds, and adds an offset. The fall-back is
usually the HPET timer on x86.
Thanks,
Mathieu
>
> Regards,
>
>
>
> Vincenzo Do
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list