Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Linux Tools Project/LTTng"

(Downloading and installing the LTTng parser library)
(rework)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
  
LTTng is a tracer for Linux that has the capability to generate a high
+
LTTng is a tracer for Linux that has the capability to generate traces (from the kernel or an application) at a high rate with very low overhead. This is achieved by instrumenting the Linux kernel. LTTng is delivered as a set of kernel patches (to collect the traces) as well as a tool chain (to control, view and analyze the generated data).
volume of traces (from the kernel or an application) with very low overhead.
+
This is achieved by instrumenting the Linux kernel.
+
LTTng is delivered as a set of kernel patches, to collect the traces, as well
+
as a tool chain to control, view and analyze the generated data.
+
  
The scope of this project is to provide an Eclipse integration of LTTng, in
+
The scope of this project is to provide an Eclipse integration of LTTng, in particular its LTTV component which is used to control, fetch and visualize the LTTng traces.
particular its LTTv component which is used to control, fetch and visualize
+
the LTTng traces.
+
  
The project will be delivered in two components:
+
The project is being delivered in two components:
* A Tracing and Monitoring Framework (TMF), a tracing tool-agnostic component that facilitates their integration in Eclipse
+
* A Tracing and Monitoring Framework (TMF), a tracing tool-agnostic component that facilitates their integration in Eclipse<!-- TMF, in the Eclipse world, stands for [http://www.eclipse.org/proposals/tmf/ Textual Modeling Framework], so the Tracing and Monitoring Framework became known as...? -->
 
* An LTTng reference implementation based on TMF
 
* An LTTng reference implementation based on TMF
 
  
 
The Tracing and Monitoring Framework will provide a number of features:
 
The Tracing and Monitoring Framework will provide a number of features:
Line 21: Line 14:
 
* Online monitoring and trace streaming
 
* Online monitoring and trace streaming
 
* Unified view for multiple, heterogeneous traces
 
* Unified view for multiple, heterogeneous traces
* Traces correlation
+
* Trace correlation
 
* Out-of-the-box set of standard tracing views
 
* Out-of-the-box set of standard tracing views
* Toolbox of tracing widgets that can be used to assemble application specific views
+
* Toolbox of tracing widgets that can be used to assemble application-specific views
 
* Toolbox of statistical widgets
 
* Toolbox of statistical widgets
 
* View synchronization mechanism
 
* View synchronization mechanism
 
* Clipboard support
 
* Clipboard support
 
* Wizards for tracing/logging/monitoring application integration
 
* Wizards for tracing/logging/monitoring application integration
* Wizard for parser generation (CSV, XML, plain text, regular expression, ...)
+
* Wizard for parser generation (CSV, XML, plain text, regular expressions, ...)
 
+
  
 
From a user's perspective, the main features of the LTTng integration are:
 
From a user's perspective, the main features of the LTTng integration are:
Line 36: Line 28:
 
* Support for distributed, multi-processor, multi-core traces synchronization
 
* Support for distributed, multi-processor, multi-core traces synchronization
 
* Example of a third-party parsing library integration
 
* Example of a third-party parsing library integration
* Standard LTTv trace visualization, correlation and analysis views
+
* Standard LTTV trace visualization, correlation and analysis views
 
* Support for kernel and the upcoming user space tracing
 
* Support for kernel and the upcoming user space tracing
 
* State tracking system
 
* State tracking system
Line 58: Line 50:
  
 
* JNI integration of the C library
 
* JNI integration of the C library
* First integration of the LTTv State Provider
+
* First integration of the LTTV State Provider
 
* Integrated Help
 
* Integrated Help
  
Line 79: Line 71:
  
 
* v 2.3
 
* v 2.3
* v2.5
+
* v 2.5
 
* v 2.6
 
* v 2.6
  
Line 103: Line 95:
 
== Try it out ==
 
== Try it out ==
  
LTTng is not yet part of the Linux Tools delivery train. To give it a try,  
+
LTTng is not yet part of the Linux Tools delivery train. To give it a try, you will need to:
you will need to:
+
 
* Checkout the plugins from the SVN repository
 
* Checkout the plugins from the SVN repository
 
* Download and install the LTTng parser library
 
* Download and install the LTTng parser library
  
For good measure, you should also consider dowloading some sample LTTng traces
+
For good measure, you should also consider downloading some sample LTTng traces (because they work :-)
(because they work :-)
+
  
 
Note that this currently only works for Linux.
 
Note that this currently only works for Linux.
Line 115: Line 105:
 
==== Downloading LTTng and TMF plugins ====
 
==== Downloading LTTng and TMF plugins ====
  
You can checkout the project plugins out of SVN from eclipse.org at
+
You can checkout the project plugins out of SVN from eclipse.org at svn://dev.eclipse.org/svnroot/technology/org.eclipse.linuxtools.
svn://dev.eclipse.org/svnroot/technology/org.eclipse.linuxtools.
+
  
 
You will need the following plugins under lttng/trunk:
 
You will need the following plugins under lttng/trunk:
Line 128: Line 117:
 
==== Downloading and installing the LTTng parser library ====
 
==== Downloading and installing the LTTng parser library ====
  
LTTv comes with a very efficient parsing library (in C) which was not re-implemented
+
LTTV comes with a very efficient parsing library (in C) which was not re-implemented in Java for this project. Instead, the library is simply integrated using JNI.
in Java for this project. Instead, the library is simply integrated using JNI.
+
  
This library is not delivered as part of Eclipse (licensing stuff) and has to be downloaded
+
This library is not delivered as part of Eclipse (licensing stuff) and has to be downloaded from the LTTng site, compiled and then installed.
from the LTTng site, compiled and then installed.
+
  
 
To parse both 2.5 and 2.6 format LTTng traces, grab a snapshot (click the "snapshot" link next to the latest commit) of the following two git refs:
 
To parse both 2.5 and 2.6 format LTTng traces, grab a snapshot (click the "snapshot" link next to the latest commit) of the following two git refs:
  
http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=shortlog;h=refs/heads/traceformat-2.5
+
* http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=shortlog;h=refs/heads/traceformat-2.5
<br>
+
* http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=shortlog;h=refs/heads/traceformat-2.6
http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=shortlog;h=refs/heads/traceformat-2.6
+
  
Build and install the 2.5 snapshot first, then the 2.6 snapshot. You should run:
+
Build and install the 2.5 snapshot first, then the 2.6 snapshot. You should run, from within each traceformat directory:
  
<tt>$ ./autogen.sh --with-jni-interface --without-lttv && make</tt>
+
<pre>
<br>
+
$ ./autogen.sh --with-jni-interface --without-lttv && make
<tt># make install</tt>
+
# make install
 +
</pre>
  
 
You will end up with something like:
 
You will end up with something like:
  
<pre>$ ls -l1 /usr/local/lib
+
<pre>
 +
$ ls -l1 /usr/local/lib
 
total 1048
 
total 1048
 
-rwxr-xr-x. 1 root root 210300 2010-06-07 11:24 liblttvtraceread-2.5.so
 
-rwxr-xr-x. 1 root root 210300 2010-06-07 11:24 liblttvtraceread-2.5.so
Line 164: Line 152:
 
To use these built libraries, start Eclipse with them on LD_LIBRARY_PATH:
 
To use these built libraries, start Eclipse with them on LD_LIBRARY_PATH:
  
<tt>LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" ./eclipse</tt>
+
<pre>
 +
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" ./eclipse
 +
</pre>
  
The full installation procedure can be found in the User Guide. In Eclipse, switch to Help
+
The full installation procedure can be found in the LTTng User Guide. In Eclipse, switch to Help (Help > Help Contents) and open the LTTng User Guide. Follow the installation procedure from the "Getting Started/Installing the LTTng parsing library" page.
(Help > Help Contents) and open the LTTng User Guide. Follow the installation procedure
+
from the "Getting Started/Installing the LTTng parsing library" page.
+
  
Note that you need the org.eclipse.linuxtools.lttng.help plugin to access the User Guide.
+
Note that you need the org.eclipse.linuxtools.lttng.help plugin to access that User Guide.
  
 
==== Sample LTTng traces ====
 
==== Sample LTTng traces ====
  
In Eclipse, switch to Help (Help > Help Contents) and open the LTTng User Guide. You can download
+
In Eclipse, switch to Help (Help > Help Contents) and open the LTTng User Guide. You can download sample traces from the "Getting Started/Samples" page.
sample traces from the "Getting Started/Samples" page.
+

Revision as of 14:01, 17 January 2011

Overview

LTTng is a tracer for Linux that has the capability to generate traces (from the kernel or an application) at a high rate with very low overhead. This is achieved by instrumenting the Linux kernel. LTTng is delivered as a set of kernel patches (to collect the traces) as well as a tool chain (to control, view and analyze the generated data).

The scope of this project is to provide an Eclipse integration of LTTng, in particular its LTTV component which is used to control, fetch and visualize the LTTng traces.

The project is being delivered in two components:

  • A Tracing and Monitoring Framework (TMF), a tracing tool-agnostic component that facilitates their integration in Eclipse
  • An LTTng reference implementation based on TMF

The Tracing and Monitoring Framework will provide a number of features:

  • Tracing project management
  • Support for very large trace files (that exceed available memory)
  • Online monitoring and trace streaming
  • Unified view for multiple, heterogeneous traces
  • Trace correlation
  • Out-of-the-box set of standard tracing views
  • Toolbox of tracing widgets that can be used to assemble application-specific views
  • Toolbox of statistical widgets
  • View synchronization mechanism
  • Clipboard support
  • Wizards for tracing/logging/monitoring application integration
  • Wizard for parser generation (CSV, XML, plain text, regular expressions, ...)

From a user's perspective, the main features of the LTTng integration are:

  • Control of the LTTng tracer running on a target node (remote or local)
  • Efficient retrieval and handling of LTTng trace files
  • Support for distributed, multi-processor, multi-core traces synchronization
  • Example of a third-party parsing library integration
  • Standard LTTV trace visualization, correlation and analysis views
  • Support for kernel and the upcoming user space tracing
  • State tracking system

Current Status

The current release (v0.2.0) implements the following features:

LTTng Perspective

  • Project View
  • Histogram View
  • Time Frame View
  • Events View
  • Control Flow View
  • Resources View
  • Statistics View
  • View Synchronization

LTTng structure

  • JNI integration of the C library
  • First integration of the LTTV State Provider
  • Integrated Help

Tracing and Monitoring Framework

  • Generic Event model
  • Generic Trace model
  • Support for arbitrarily large traces
  • Support for custom trace parsers
  • Concurrent Data Request handling
  • Generic Events View

Limitations

  • Homogeneous LTTng trace support only

Configurations

The following LTTng traces formats are supported:

  • v 2.3
  • v 2.5
  • v 2.6

Future Plans

V0.3.0

  • LTTng Control (remote and local)
  • Parser Generator Wizard
  • Performance improvements
  • Bug fixes :-)

Screenshots

LTTngPerspective.png

LTTng Perspective

Video Demo

Coming (not so) soon.

Try it out

LTTng is not yet part of the Linux Tools delivery train. To give it a try, you will need to:

  • Checkout the plugins from the SVN repository
  • Download and install the LTTng parser library

For good measure, you should also consider downloading some sample LTTng traces (because they work :-)

Note that this currently only works for Linux.

Downloading LTTng and TMF plugins

You can checkout the project plugins out of SVN from eclipse.org at svn://dev.eclipse.org/svnroot/technology/org.eclipse.linuxtools.

You will need the following plugins under lttng/trunk:

  • org.eclipse.linuxtools.lttng
  • org.eclipse.linuxtools.lttng.help
  • org.eclipse.linuxtools.lttng.jni
  • org.eclipse.linuxtools.lttng.ui
  • org.eclipse.linuxtools.tmf
  • org.eclipse.linuxtools.tmf.ui

Downloading and installing the LTTng parser library

LTTV comes with a very efficient parsing library (in C) which was not re-implemented in Java for this project. Instead, the library is simply integrated using JNI.

This library is not delivered as part of Eclipse (licensing stuff) and has to be downloaded from the LTTng site, compiled and then installed.

To parse both 2.5 and 2.6 format LTTng traces, grab a snapshot (click the "snapshot" link next to the latest commit) of the following two git refs:

Build and install the 2.5 snapshot first, then the 2.6 snapshot. You should run, from within each traceformat directory:

$ ./autogen.sh --with-jni-interface --without-lttv && make
# make install

You will end up with something like:

$ ls -l1 /usr/local/lib
total 1048
-rwxr-xr-x. 1 root root 210300 2010-06-07 11:24 liblttvtraceread-2.5.so
-rwxr-xr-x. 1 root root 211052 2010-06-07 11:25 liblttvtraceread-2.6.so
-rw-r--r--. 1 root root 316040 2010-06-07 11:25 liblttvtraceread.a
-rwxr-xr-x. 1 root root   1175 2010-06-07 11:25 liblttvtraceread.la
-rwxr-xr-x. 1 root root  93963 2010-06-07 11:24 liblttvtraceread_loader-2.5.so
-rwxr-xr-x. 1 root root  93963 2010-06-07 11:25 liblttvtraceread_loader-2.6.so
-rw-r--r--. 1 root root 125442 2010-06-07 11:25 liblttvtraceread_loader.a
-rwxr-xr-x. 1 root root   1224 2010-06-07 11:25 liblttvtraceread_loader.la
lrwxrwxrwx. 1 root root     30 2010-06-07 11:25 liblttvtraceread_loader.so -> liblttvtraceread_loader-2.6.so
lrwxrwxrwx. 1 root root     23 2010-06-07 11:25 liblttvtraceread.so -> liblttvtraceread-2.6.so

To use these built libraries, start Eclipse with them on LD_LIBRARY_PATH:

LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" ./eclipse

The full installation procedure can be found in the LTTng User Guide. In Eclipse, switch to Help (Help > Help Contents) and open the LTTng User Guide. Follow the installation procedure from the "Getting Started/Installing the LTTng parsing library" page.

Note that you need the org.eclipse.linuxtools.lttng.help plugin to access that User Guide.

Sample LTTng traces

In Eclipse, switch to Help (Help > Help Contents) and open the LTTng User Guide. You can download sample traces from the "Getting Started/Samples" page.

Back to the top