← Back to LTTng's blog

LTTng Toolchain 2.5.0 is out!


Hi all!

The LTTng 2.5 stable release, codenamed Fumisterie, is finally ready!

LTTng-tools 2.5.0

As a reminder, this release includes a save and load session feature, UST perf counter support, daemon configuration file and the ability to load user defined kernel probes using --kmod-probes with lttng-sessiond.

LTTng-UST 2.5.0

  • New tracef() instrumentation facility. Excerpt from the lttng-ust(3) man page:

  The simplest way to add instrumentation to your  code  is  by  far  the
  tracef() API. To do it, in a nutshell:

  1) #include <lttng/tracef.h>

  2) /* in your code, use like a printf */
    tracef("my message, this integer %d", 1234);

  3) Link your program against liblttng-ust.so.

  4) Enable  UST events when tracing with the following sequence of commands
    from lttng-tools:

    lttng create
    lttng enable-event -u -a
    lttng start
    [... run your program ...]
    lttng stop
    lttng view

  That's it!

  If you want to have more flexibility and control on  the  event  names,
  payload  typing,  etc,  you  can continue reading on and use the trace‐
  points below. "tracef()" is there for quick and dirty ad hoc instrumen‐
  tation, whereas tracepoint.h is meant for thorough instrumentation of a
  code base to be integrated with an upstream project.
  • Perf PMU counters support from user-space on x86.
  • Library base address dump is now stable (thanks to Mentor for their contribution)

LTTng-modules 2.5.0

  • State dump of block devices,
  • State dump of file descriptor flags and modes,
  • 3.15 Linux kernel support,
  • v4lv2 instrumentation support,
  • MIPS32 system call tracing,
  • New /proc/lttng-logger ABI.

Here's how to use the new /proc/lttng-logger ABI. From the command line (for instance):

Start lttng-sessiond as root:

sudo lttng-sessiond

Start tracing from root or from a user belonging to the tracing group:

lttng create
lttng enable-event --kernel lttng-logger

Write event payload data to /proc/lttng-logger (from any user, does not need to be in any group):

echo -n "Some message" > /proc/lttng-logger

Stop tracing, view the trace:

lttng stop
lttng view

You should see:

[10:44:24.810273367] (+?.?????????) thinkos lttng_logger: { cpu_id = 3 }, { _msg_length = 12, msg = "Some message" }

It is a quick and easy way to trace some events from user space through the kernel tracer. It is much more basic than UST: lttng-logger is slower (involves system call round-trip to the kernel) and only supports logging strings. But it's very quick and easy to use, especially from scripts.

As always you can find the different packages in the Download section.