Wrong timestamps in trace
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 28 lines · ----- On Jun 12, 2017, at 11:21 AM, Thomas McGuire [email protected]…
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
Quoted 6 lines
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
Quoted 13 lines
Thanks,
Thomas
--
Thomas McGuire | [email protected] | Senior Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 7 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Mathieu,
Quoted 39 lines · Mathieu Desnoyers
Quoted 26 lines
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 stopQuoted 6 lines
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.
Quoted 6 lines
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 for the quick response, that was exactly my problem! I simply issued an "insmod" on every lttng-related .ko file that lttng built, and that included the test clock plugin.
The reason why I used "insmod" is that for me, lttng-sessiond didn't load the lttng modules itself. I looked at this further now, and the reason was that I didn't issue a "depmod -a". With that, everything now works perfectly, the timestamps are correct and TraceCompass shows me a nice schedule :)
Thanks again for your help and every developer here for providing lttng, it's a great tool.
Regards,
Thomas
Signature · 4 lines
Thomas McGuire | [email protected] | Senior Software Engineer KDAB (Deutschland) GmbH & Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt, C++ and OpenGL Experts
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev