LWN.net Logo

LTTng in the Ubuntu kernel

By Jake Edge
May 18, 2011

The Linux Trace Toolkit next generation (LTTng) is a high-performance out-of-tree kernel tracer that has been integrated into several embedded distributions. It is currently being used in the Linaro kernel, which is based on Ubuntu's, but because of the size of the patch set, that is not seen as sustainable into the future. As it turns out, the LTTng team has been working on a way to reduce or eliminate the need for patches to the core kernel by turning LTTng into a kernel module.

Julien Desfossez attended the recent Ubuntu Developer Summit (UDS) to propose adding LTTng to Ubuntu, both for the upcoming 11.10 ("Oneiric Ocelot") as well as the 12.04 LTS release coming next year. Because of its integration with user space, as well as its use in Linaro, LTTng is seen as a desirable feature for Ubuntu. The question came down to how to get there.

There are two versions of LTTng 2.0, one of which requires a substantial, rather intrusive set of patches, while the other, 2.0-distro, only requires a small handful of changes that look to be fairly minor cleanups in the kernel. The ring buffer and the rest of LTTng have been moved to modules for 2.0-distro. Most of the functionality of LTTng is preserved, though there are a few missing pieces. The trace clock has been removed from 2.0-distro, so tracing in NMI contexts is no longer possible. In addition, there is no support for NO_HZ kernels.

Since it was not clear that the changes needed for 2.0-distro would make it upstream before the 11.10 kernel freeze, it was determined that the kernel team would help Desfossez create a personal package archive (PPA) for this release, with an eye toward enabling the feature in the 12.04 release. The LTTng team is still working to try to get the full 2.0 code upstream (beginning with the generic ring buffer that could be shared with Ftrace and perf), but the modularized version will be useful in the meantime.

Later in the week, Desfossez said that Mathieu Desnoyers had found a way to not require any core kernel changes for 2.0-distro in the day or two after the meeting. Whether that will result in Ubuntu building and shipping the LTTng modules as a dkms package for 11.10 is not yet known. In any case, it would seem that LTTng will be available, in one form or another, for Ubuntu kernels going forward.


(Log in to post comments)

LTTng in the Ubuntu kernel

Posted May 19, 2011 19:32 UTC (Thu) by compudj (subscriber, #43335) [Link]

FYI, as clarifications to the article, the upcoming "LTTng 2.0" kernel tracer will support NOHZ kernels: it will however cause the system to consume extra power when tracing is active, because the NOHZ kernel infrastructure lacks notifier chains.

About trace clocks, I have a plan to merge the LTTng trace clocks into the LTTng modules package. So we should soon expect the full LTTng performance with this stand-alone module package.

Thanks,

Mathieu Desnoyers

LTTng in the Ubuntu kernel

Posted Dec 3, 2011 19:13 UTC (Sat) by Hassan (guest, #81676) [Link]

Is lttng available for Ubuntu 11.10 (Kernel 3.0) ?

Thanks

LTTng in the Ubuntu kernel

Posted Feb 17, 2012 1:28 UTC (Fri) by compudj (subscriber, #43335) [Link]

It is available for Ubuntu 11.10 through this PPA: see https://launchpad.net/~lttng/+archive/daily

Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds