[lttng-dev] Wrong timestamps in trace

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Mon Jun 12 16:08:54 UTC 2017


----- On Jun 12, 2017, at 11:21 AM, Thomas McGuire thomas.mcguire at kdab.com wrote:

> Hi,
> 
> I'm struggling to get lttng to run on an i.MX 25 board. I got everything
> working, however the timestamps in the resulting trace file are all the
> same. Because of the timestamps, TraceCompass fails at visualizing the
> schedule.
> I record on the device and then copy the trace over to my host to
> examine it with babeltrace. See attached text files for the start and
> the end of the trace, showing the timestamps being the same, despite the
> trace running for a few seconds.
> 
> The output of lttng-sessiond -v is also attached.
> 
> I started everything the following way:
>  cd /lib/modules/4.9.28-20170428-1/kernel/extra
>  find . -type f -exec insmod {} \;
>  find . -type f -exec insmod {} \;
>  find . -type f -exec insmod {} \;
>  find . -type f -exec insmod {} \;
> lttng-sessiond -v --consumerd32-path=/usr/bin/lttng-consumerd &>
> sessiond-log.txt
>  lttng create my-session --output=/home/lttng/my-trace
>  lttng enable-event --kernel --syscall --all --channel channel0
>  lttng enable-event --kernel --channel channel0 sched*
>  lttng start
>  sleep 5 # do something
>  lttng stop
> 
> The Linux distribution is Pengutronix's ptxdist, which doesn't have
> lttng rules, so I manually cross-compiled lttng-tools 2.9.4 and
> lttng-modules 2.9.2. Kernel is 4.9.28-20170428-1, babeltrace on the host
> is 1.2.4.
> 
> What do I need to do to get correct timestamps?

Hi Thomas,

It appears like you may have the lttng-modules tests/clock-plugin
kernel module loaded, which overrides the clock source with a
"dummy" clock for testing purposes.

Can you provide the output of lsmod ? Or did you build lttng
within your kernel image ? If so, what is your kernel config ?

Can you also provide the "metadata" file generated as attachment ?
It will allow us to confirm whether it's using the kernel clock
("monotonic") or the dummy test clock ("lttng_test_clock_override").

Thanks,

Mathieu


> 
> Thanks,
> Thomas
> --
> Thomas McGuire | thomas.mcguire at kdab.com | Senior Software Engineer
> KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
> Tel: +49-30-521325470
> KDAB - The Qt Experts
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list