--- /dev/null
+LTTng Documentation
+===================
+
+This is the official repository of the
+[online LTTng Documentation's](http://lttng.org/docs) source.
+
+To contribute:
+
+ 1. Fork this repo
+ 2. Make your change, following the [contributor's guide](contrib-guide.md)
+ 3. Create a pull request
+
+Thanks for your contributions and fixes!
--- /dev/null
+---
+id: getting-started
+---
+
+This is a small guide to get started quickly with LTTng kernel and user
+space tracing. For intermediate to advanced use cases and a more
+thorough understanding of LTTng, see [Using LTTng](#doc-using-lttng) and
+[Understanding LTTng](#doc-understanding-lttng).
+
+Before reading this guide, make sure LTTng
+[is installed](#doc-installing-lttng). You will at least need
+LTTng-tools. Also install LTTng-modules for
+[tracing the Linux kernel](#doc-tracing-the-linux-kernel) and LTTng-UST
+for
+[tracing your own user space applications](#doc-tracing-your-own-user-application).
+When your traces are finally written and complete, the
+[Viewing and analyzing your traces](#doc-viewing-and-analyzing-your-traces)
+section of this chapter will help you do something useful with them.
--- /dev/null
+---
+id: tracing-the-linux-kernel
+---
+
+Make sure LTTng-tools and LTTng-modules packages
+[are installed](#doc-installing-lttng).
+
+Since you're about to trace the Linux kernel itself, let's look at the
+available kernel events using the `lttng` tool, which has a
+Git like command line structure:
+
+<pre class="term">
+lttng list --kernel
+</pre>
+
+<div class="tip">
+<p>
+ <span class="t">Tip:</span>You can avoid using <code>sudo</code> in
+ the previous and following commands if your user is part of the
+ <a href="/docs/#doc-lttng-sessiond"><code>tracing</code> group</a>.
+</p>
+</div>
+
+Before tracing, you need to create a session:
+
+<pre class="term">
+sudo lttng create my-session
+</pre>
+
+`my-session` is the tracing session name and could be anything you
+like. `auto` will be used if omitted.
+
+Let's now enable some events for this session:
+
+<pre class="term">
+sudo lttng enable-event --kernel sched_switch,sched_process_fork
+</pre>
+
+or you might want to simply enable all available kernel events (beware
+that trace files will grow rapidly when doing this):
+
+<pre class="term">
+sudo lttng enable-event --kernel --all
+</pre>
+
+Start tracing:
+
+<pre class="term">
+sudo lttng start
+</pre>
+
+By default, traces are saved in
+<code>~/lttng-traces/<em>name</em>-<em>date</em>-<em>time</em></code>,
+where <code><em>name</em></code> is the session name.
+
+When you're done tracing:
+
+<pre class="term">
+sudo lttng stop
+sudo lttng destroy
+</pre>
+
+Although `destroy` looks scary here, it doesn't actually destroy the
+outputted traces: it only destroys the tracing session.
+
+What's next? Have a look at
+[Viewing and analyzing your traces](#doc-viewing-and-analyzing-your-traces)
+to view and analyze the trace you just recorded.
--- /dev/null
+---
+id: tracing-your-own-user-application
+---
+
+The previous section helped you create a trace out of Linux kernel events.
+This section steps you through a simple example showing you how to trace
+a _Hello world_ program written in C.
+
+Make sure LTTng-tools and LTTng-UST packages
+[are installed](#doc-installing-lttng).
+
+Tracing is just like having `printf()` calls at specific locations of
+your source code, albeit LTTng is much more faster and flexible than
+`printf()`. In the LTTng realm, **`tracepoint()`** is analogous to
+`printf()`.
+
+Unlike `printf()`, though, `tracepoint()` does not use a format string to
+know the types of its arguments: the formats of all tracepoints must be
+defined before using them. So before even writing our _Hello world_ program,
+we need to define the format of our tracepoint. This is done by writing a
+**template file**, with a name usually ending with the `.tp` extension,
+which the `lttng-gen-tp` tool (shipped with LTTng-UST) will use to generate
+an object file and a header to be included in our application source code.
+
+Here's the whole flow:
+
+<div class="img img-80">
+ <object data="/images/docs/lttng-lttng-gen-tp.svg" type="image/svg+xml">
+ <img src="/images/docs/lttng-lttng-gen-tp.svg">
+ </object>
+</div>
+
+The template file format is a list of tracepoint definitions
+and other optional definition entries which we will skip for
+this quickstart. Each tracepoint is defined using the
+`TRACEPOINT_EVENT()` macro. For each tracepoint, you must provide:
+
+ * a **provider name**, which is the "scope" of this tracepoint (this usually
+ includes the company and project names)
+ * a **tracepoint name**
+ * a **list of arguments** for the eventual `tracepoint()` call, each item being:
+ * the argument C type
+ * the argument name
+ * a **list of fields**, which will be the actual fields of the recorded events
+ for this tracepoint
+
+Here's a simple tracepoint definition example with two arguments: an integer
+and a string:
+
+~~~ c
+TRACEPOINT_EVENT(
+ hello_world,
+ my_first_tracepoint,
+ TP_ARGS(
+ int, my_integer_arg,
+ char*, my_string_arg
+ ),
+ TP_FIELDS(
+ ctf_string(my_string_field, my_string_arg)
+ ctf_integer(int, my_integer_field, my_integer_arg)
+ )
+)
+~~~
+
+The exact syntax is well explained in the
+[C application](#doc-c-application) instrumenting guide of the
+[Using LTTng](#doc-using-lttng) chapter, as well as in the
+<a href="/man/3/lttng-ust" class="ext">LTTng-UST manpage</a>.
+
+Save the above snippet as `hello-tp.tp` and run:
+
+<pre class="term">
+lttng-gen-tp hello-tp.tp
+</pre>
+
+The following files will be created next to `hello-tp.tp`:
+
+ * `hello-tp.c`
+ * `hello-tp.o`
+ * `hello-tp.h`
+
+`hello-tp.o` is the compiled object file of `hello-tp.c`.
+
+Now, by including `hello-tp.h` in your own application, you may use the
+tracepoint defined above by properly refering to it when calling
+`tracepoint()`:
+
+~~~ c
+#include <stdio.h>
+#include "hello-tp.h"
+
+int main(int argc, char* argv[])
+{
+ int x;
+
+ puts("Hello, World!\nPress Enter to continue...");
+
+ /* The following getchar() call is only placed here for the purpose
+ * of this demonstration, for pausing the application in order for
+ * you to have time to list its events. It's not needed otherwise.
+ */
+ getchar();
+
+ /* A tracepoint() call. Arguments, as defined in hello-tp.tp:
+ *
+ * 1st: provider name (always)
+ * 2nd: tracepoint name (always)
+ * 3rd: my_integer_arg (first user-defined argument)
+ * 4th: my_string_arg (second user-defined argument)
+ *
+ * Notice the provider and tracepoint names are NOT strings;
+ * they are in fact parts of variables created by macros in
+ * hello-tp.h.
+ */
+ tracepoint(hello_world, my_first_tracepoint, 23, "hi there!");
+
+ for (x = 0; x < argc; ++x) {
+ tracepoint(hello_world, my_first_tracepoint, x, argv[x]);
+ }
+
+ puts("Quitting now!");
+
+ tracepoint(hello_world, my_first_tracepoint, x * x, "x^2");
+
+ return 0;
+}
+~~~
+
+Save this as `hello.c`, next to `hello-tp.tp`.
+
+Notice `hello-tp.h`, the header file generated by `lttng-gen-tp` from
+our template file `hello-tp.tp`, is included by `hello.c`.
+
+You are now ready to compile the application with LTTng-UST support:
+
+<pre class="term">
+gcc -o hello hello.c <strong>hello-tp.o -llttng-ust -ldl</strong>
+</pre>
+
+If you followed the
+[Tracing the Linux kernel](#doc-tracing-the-linux-kernel) section, the
+following steps will look familiar.
+
+First, run the application with a few arguments:
+
+<pre class="term">
+./hello world and beyond
+</pre>
+
+You should see
+
+~~~ text
+Hello, World!
+Press Enter to continue...
+~~~
+
+Use the `lttng` tool to list all available user space events:
+
+<pre class="term">
+lttng list --userspace
+</pre>
+
+You should see the `hello_world:my_first_tracepoint` tracepoint listed
+under the `./hello` process.
+
+Create a tracing session:
+
+<pre class="term">
+lttng create my-userspace-session
+</pre>
+
+Enable the `hello_world:my_first_tracepoint` tracepoint:
+
+<pre class="term">
+lttng enable-event --userspace hello_world:my_first_tracepoint
+</pre>
+
+Start tracing:
+
+<pre class="term">
+lttng start
+</pre>
+
+Go back to the running `hello` application and press Enter. All `tracepoint()`
+calls will be executed and the program will finally exit.
+
+Stop tracing and destroy the tracing session:
+
+<pre class="term">
+lttng stop
+lttng destroy my-userspace-session
+</pre>
+
+Done! You may use `lttng view` to list the recorded events. This command
+starts
+<a href="http://www.efficios.com/babeltrace" class="ext"><code>babeltrace</code></a>
+in the background, if it is installed:
+
+<pre class="term">
+lttng view
+</pre>
+
+should output something like:
+
+~~~ text
+[18:10:27.684304496] (+?.?????????) hostname hello_world:my_first_tracepoint: { cpu_id = 0 }, { my_string_field = "hi there!", my_integer_field = 23 }
+[18:10:27.684338440] (+0.000033944) hostname hello_world:my_first_tracepoint: { cpu_id = 0 }, { my_string_field = "./hello", my_integer_field = 0 }
+[18:10:27.684340692] (+0.000002252) hostname hello_world:my_first_tracepoint: { cpu_id = 0 }, { my_string_field = "world", my_integer_field = 1 }
+[18:10:27.684342616] (+0.000001924) hostname hello_world:my_first_tracepoint: { cpu_id = 0 }, { my_string_field = "and", my_integer_field = 2 }
+[18:10:27.684343518] (+0.000000902) hostname hello_world:my_first_tracepoint: { cpu_id = 0 }, { my_string_field = "beyond", my_integer_field = 3 }
+[18:10:27.684357978] (+0.000014460) hostname hello_world:my_first_tracepoint: { cpu_id = 0 }, { my_string_field = "x^2", my_integer_field = 16 }
+~~~
+
+The next section presents other alternatives to view and analyze your
+LTTng traces.
--- /dev/null
+---
+id: viewing-and-analyzing-your-traces
+---
+
+This section describes how to visualize the data gathered after tracing
+the Linux kernel or a user space application.
+
+Many ways exist to read your LTTng traces:
+
+ * **`babeltrace`** is a command line utility which converts trace formats;
+ it supports the format used by LTTng,
+ <abbr title="Common Trace Format">CTF</abbr>, as well as a basic
+ text output which may be `grep`ed. The `babeltrace` command is
+ part of the
+ <a href="http://www.efficios.com/babeltrace" class="ext">Babeltrace</a> project.
+ * Babeltrace also includes a **Python binding** so that you may
+ easily open and read an LTTng trace with your own script, benefiting
+ from the power of Python.
+ * The **<a href="https://eclipse.org/downloads/packages/eclipse-ide-cc-developers/lunar" class="ext">
+ Eclise IDE for C/C++ Developers</a>**
+ includes the Tracing and Monitoring Framework (TMF) plugin which
+ supports LTTng traces, amongst others.
+
+LTTng trace files are usually recorded in the `~/lttng-traces` directory.
+Let's now view the trace and perform a basic analysis using
+`babeltrace`.
+
+The simplest way to list all the recorded events of a trace is to pass its
+path to `babeltrace` with no options:
+
+<pre class="term">
+babeltrace ~/lttng-traces/my-session
+</pre>
+
+`babeltrace` will find all traces within the given path recursively and
+output all their events, merging them intelligently.
+
+Listing all the system calls of a Linux kernel trace with their arguments is
+easy with `babeltrace` and `grep`:
+
+<pre class="term">
+babeltrace ~/lttng-traces/my-kernel-session | grep sys_
+</pre>
+
+Counting events is also straightforward:
+
+<pre class="term">
+babeltrace ~/lttng-traces/my-kernel-session | grep sys_read | wc -l
+</pre>
+
+The text output of `babeltrace` is useful for isolating events by simple
+matching using `grep` and similar utilities. However, more elaborate filters
+such as keeping only events with a field value falling within a specific range
+are not trivial to write using a shell. Moreover, reductions and even the
+most basic computations involving multiple events are virtually impossible
+to implement.
+
+Fortunately, Babeltrace ships with a Python 3 binding which makes it
+really easy to read the events of an LTTng trace sequentially and compute
+the desired information.
+
+Here's a simple example using the Babeltrace Python binding. The following
+script accepts an LTTng Linux kernel trace path as its first argument and
+outputs the short names of the top 5 running processes on CPU 0 during the
+whole trace:
+
+~~~ python
+import sys
+from collections import Counter
+import babeltrace
+
+
+def top5proc():
+ if len(sys.argv) != 2:
+ msg = 'Usage: python {} TRACEPATH'.format(sys.argv[0])
+ raise ValueError(msg)
+
+ # a trace collection holds one to many traces
+ col = babeltrace.TraceCollection()
+
+ # add the trace provided by the user
+ # (LTTng traces always have the 'ctf' format)
+ if col.add_trace(sys.argv[1], 'ctf') is None:
+ raise RuntimeError('Cannot add trace')
+
+ # this counter dict will hold execution times:
+ #
+ # task command name -> total execution time (ns)
+ exec_times = Counter()
+
+ # this holds the last `sched_switch` timestamp
+ last_ts = None
+
+ # iterate events
+ for event in col.events:
+ # keep only `sched_switch` events
+ if event.name != 'sched_switch':
+ continue
+
+ # keep only events which happened on CPU 0
+ if event['cpu_id'] != 0:
+ continue
+
+ # event timestamp
+ cur_ts = event.timestamp
+
+ if last_ts is None:
+ # we start here
+ last_ts = cur_ts
+
+ # previous task command (short) name
+ prev_comm = event['prev_comm']
+
+ # initialize entry in our dict if not yet done
+ if prev_comm not in exec_times:
+ exec_times[prev_comm] = 0
+
+ # compute previous command execution time
+ diff = cur_ts - last_ts
+
+ # update execution time of this command
+ exec_times[prev_comm] += diff
+
+ # update last timestamp
+ last_ts = cur_ts
+
+ # display top 10
+ for name, ns in exec_times.most_common()[:5]:
+ s = ns / 1000000000
+ print('{:20}{} s'.format(name, s))
+
+
+if __name__ == '__main__':
+ top5proc()
+~~~
+
+Save this script as `top5proc.py` and run it with Python 3, providing the
+path to an LTTng Linux kernel trace as the first argument:
+
+<pre class="term">
+python3 top5proc.py ~/lttng-sessions/my-session-.../kernel
+</pre>
+
+Make sure the path you provide is the directory containing actual trace
+files (`channel0_0`, `metadata`, etc.): the `babeltrace` utility recurses
+directories, but the Python binding does not.
+
+Here's an example of output:
+
+~~~ text
+swapper/0 48.607245889 s
+chromium 7.192738188 s
+pavucontrol 0.709894415 s
+Compositor 0.660867933 s
+Xorg.bin 0.616753786 s
+~~~
+
+Note that `swapper/0` is the "idle" process of CPU 0 on Linux; since we
+weren't using the CPU that much when tracing, its first position in the list
+makes sense.
--- /dev/null
+---
+id: building-from-source
+---
+
+As [previously stated](#doc-installing-lttng), LTTng is shipped as
+three packages: LTTng-tools, LTTng-modules and LTTng-UST. LTTng-tools
+contains everything needed to control tracing sessions, while
+LTTng-modules is only needed for Linux kernel tracing and LTTng-UST is
+only needed for user space tracing.
+
+The tarballs are available in the
+<a href="http://lttng.org/download#build-from-source" class="ext">Download
+section</a> of the LTTng website.
+
+Please refer to the `README.md` files provided by each package to
+properly build and install them.
+
+<div class="tip">
+<p>
+<span class="t">Tip:</span>The aforementioned <code>README.md</code> files
+are rendered as rich text when
+<a href="https://github.com/lttng" class="ext">viewed on GitHub</a>.
+</p>
+</div>
--- /dev/null
+---
+id: archlinux
+---
+
+LTTng packages are available in the
+<abbr title="Arch User Repository">AUR</abbr>:
+<a href="https://aur.archlinux.org/packages/lttng-tools/" class="ext"><code>lttng-tools</code></a>,
+<a href="https://aur.archlinux.org/packages/lttng-modules/" class="ext"><code>lttng-modules</code></a>
+and
+<a href="https://aur.archlinux.org/packages/lttng-ust/" class="ext"><code>lttng-ust</code></a>.
+
+You can automate all this using
+<a href="https://wiki.archlinux.org/index.php/yaourt" class="ext">Yaourt</a>.
+
+<pre class="term">
+yaourt -Sy lttng-tools lttng-modules lttng-ust
+</pre>
+
+If you're living on the edge, the AUR also contains the latest Git masters
+of those packages:
+<a href="https://aur.archlinux.org/packages/lttng-tools-git/" class="ext"><code>lttng-tools-git</code></a>,
+<a href="https://aur.archlinux.org/packages/lttng-modules-git/" class="ext"><code>lttng-modules-git</code></a>
+and
+<a href="https://aur.archlinux.org/packages/lttng-ust-git/" class="ext"><code>lttng-ust-git</code></a>.
--- /dev/null
+---
+id: debian
+---
+
+Debian wheezy (stable) and previous versions are not supported; you will
+need to build and install LTTng packages
+[from source](#doc-building-from-source) for those.
+
+Debian jessie (testing) and sid (unstable) have everything you need:
+
+<pre class="term">
+sudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev
+</pre>
--- /dev/null
+---
+id: enterprise-distributions
+---
+
+To install LTTng on enterprise distributions, please see
+<a href="http://packages.efficios.com/" class="ext">EfficiOS
+Enterprise Packages</a>.
--- /dev/null
+---
+id: fedora
+---
+
+Starting from Fedora 17, LTTng-tools and LTTng-UST packages are officially
+available using `yum`:
+
+<pre class="term">
+sudo yum install lttng-tools lttng-ust
+</pre>
+
+LTTng-modules still needs to be built and installed
+[from source](#doc-building-from-source).
+
--- /dev/null
+---
+id: desktop-distributions
+---
+
+Official and unofficial LTTng packages are available for the major
+Linux desktop distributions: [Ubuntu](#doc-ubuntu),
+[Fedora](#doc-fedora), [Debian](#doc-debian), [openSUSE](#doc-opensuse)
+(and other RPM-based distributions) and [Arch Linux](#doc-archlinux).
+LTTng is regularly tested on those. Should any issue arise when
+following the procedures below, please inform the
+<a href="/community" class="ext">community</a> about it.
+
+Support is also available for
+[enterprise distributions](#doc-enterprise-distributions) such as
+Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES).
--- /dev/null
+---
+id: opensuse
+---
+
+openSUSE has LTTng packages since version 12.3. To install LTTng, you
+first need to add an entry to your repositories. All LTTng repositories
+are available
+<a href="http://download.opensuse.org/repositories/devel:/tools:/lttng/" class="ext">here</a>.
+For example, the following will add the LTTng repository for
+openSUSE 13.1:
+
+<pre class="term">
+sudo -i
+curl http://download.opensuse.org/repositories/devel:/tools:/lttng/openSUSE_13.1/devel:tools:lttng.repo > /etc/zypp/repos.d/lttng.repo
+</pre>
+
+Then, refresh the package database:
+
+<pre class="term">
+sudo zypper refresh
+</pre>
+
+and install `lttng-tools`, `lttng-modules` and `lttng-ust-devel`:
+
+<pre class="term">
+sudo zypper install lttng-tools lttng-modules lttng-ust-devel
+</pre>
--- /dev/null
+---
+id: ubuntu
+---
+
+The following steps apply to Ubuntu ≥ 12.04. For
+previous releases, you will need to build and install LTTng
+[from source](#doc-building-from-source), as no Ubuntu packages were
+available before version 12.04.
+
+Two sources of LTTng packages are available for Ubuntu: official
+repositories and <abbr title="Personal Package Archive">PPA</abbr>.
--- /dev/null
+---
+id: ubuntu-official-repositories
+---
+
+To install LTTng from the official Ubuntu repositories, simply use `apt-get`:
+
+<pre class="term">
+sudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev
+</pre>
+
+No need to reboot!
+
+
--- /dev/null
+---
+id: ubuntu-ppa
+---
+
+The
+<a href="https://launchpad.net/~lttng/+archive/ubuntu/ppa/" class="ext">LTTng PPA</a>
+offers the latest stable versions of LTTng packages. To get packages
+from the PPA, follow these steps:
+
+<pre class="term">
+sudo apt-add-repository ppa:lttng/ppa
+sudo apt-get update
+sudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev
+</pre>
--- /dev/null
+---
+id: buildroot
+---
+
+LTTng packages in Buildroot are `lttng-tools`, `lttng-modules` and
+`lttng-libust`.
+
+To enable them, start the Buildroot configuration menu as usual:
+
+<pre class="term">
+make menuconfig
+</pre>
+
+In:
+
+ * _Kernel_: make sure _Linux kernel_ is enabled
+ * _Toolchain_: make sure the following options are enabled:
+ * _Enable large file (files > 2GB) support_
+ * _Enable WCHAR support_
+
+In _Target packages_/_Debugging, profiling and benchmark_, enable
+_lttng-modules_ and _lttng-tools_. In
+_Target packages_/_Libraries_/_Other_, enable _lttng-libust_.
--- /dev/null
+---
+id: embedded-distributions
+---
+
+Some developers may be interested in tracing the Linux kernel and user space
+applications running on embedded systems. LTTng is packaged by two popular
+embedded Linux distributions: [Buildroot](#doc-buildroot) and
+[OpenEmbedded/Yocto](#doc-oe-yocto).
--- /dev/null
+---
+id: oe-yocto
+---
+
+LTTng recipes are available in the `openembedded-core` layer of
+OpenEmbedded:
+
+ * `lttng-tools`
+ * `lttng-modules`
+ * `lttng-ust`
+
+Using BitBake, the simplest way to include LTTng recipes in your
+target image is to add them to `IMAGE_INSTALL_append` in
+`conf/local.conf`:
+
+~~~ text
+IMAGE_INSTALL_append = " lttng-tools lttng-modules lttng-ust"
+~~~
+
+If you're using Hob, click _Edit image recipe_ once you have selected
+a machine and an image recipe. Then, in the _All recipes_ tab, search
+for `lttng` and you should find and be able to include the three LTTng
+recipes.
--- /dev/null
+---
+id: installing-lttng
+---
+
+**LTTng** is a set of software components which interact to allow
+instrumenting the Linux kernel and user applications and controlling
+tracing sessions (starting/stopping tracing, enabling/disabling events,
+etc.). Those components are bundled into the following packages:
+
+ * **LTTng-tools**: Libraries and command line interface to control
+ tracing sessions
+ * **LTTng-modules**: Linux kernel modules allowing Linux to be
+ traced using LTTng
+ * **LTTng-UST**: User space tracing library
+
+Most distributions mark the LTTng-modules and LTTng-UST packages as
+optional. In the following sections, we always provide the steps to
+install all three, but be aware that LTTng-modules is only required if
+you intend to trace the Linux kernel and LTTng-UST is only required if
+you intend to trace user space applications.
+
+This chapter shows how to install the above packages on a Linux
+system. The easiest way is to use the package manager of the system's
+distribution ([desktop](#doc-desktop-distributions) or
+[embedded](#doc-embedded-distributions)). Otherwise, you can
+[build the LTTng packages from source](#doc-building-from-source).
--- /dev/null
+---
+id: nuts-and-bolts
+---
+
+What is LTTng? As its name suggests, the
+_Linux Trace Toolkit: next generation_ is a modern toolkit for
+tracing Linux systems and applications. So your first question might
+rather be: **what is tracing?**
+
+As the history of software engineering progressed and led to what
+we now take for granted—complex, numerous and
+interdependent software applications running in parallel on
+sophisticated operating systems like Linux—the authors of such
+components, or software developers, began feeling a natural
+urge of having tools to ensure the robustness and good performance
+of their masterpieces.
+
+One major achievement in this field is, inarguably, the
+<a href="https://www.gnu.org/software/gdb/" class="ext">GNU debugger
+(GDB)</a>, which is an essential tool for developers to find and fix
+bugs. But even the best debugger won't help make your software run
+faster, and nowadays, faster softwares means either more work done by
+the same hardware, or cheaper hardware for the same work.
+
+A _profiler_ is often the tool of choice to identify performance
+bottleneck. Profiling is suitable to identify _where_ performance is
+lost in a given software; the profiler outputs a profile, a
+statistical summary of observed events, which you may use to know
+which functions took the most time to execute. However, a profiler
+won't report _why_ some identified functions are the bottleneck.
+Also, bottlenecks might only occur when specific conditions are met.
+For a thorough investigation of software performance issues, a history
+of execution, with historical values of chosen variables, is
+essential. This is where tracing comes in handy.
+
+_Tracing_ is a technique used to understand what goes on in a running
+software system. The software used for tracing is called a _tracer_,
+which is conceptually similar to a tape recorder. When recording,
+specific points placed in the software source code generate events
+that are saved on a giant tape: a _trace_ file. Both user applications
+and the operating system may be traced at the same time, opening the
+possibility of resolving a wide range of problems that are otherwise
+extremely challenging.
+
+Tracing is often compared to _logging_. However, tracers and loggers
+are two different tools, serving two different purposes. Tracers are
+designed to record much lower-level events that occur much more
+frequently than log messages, often in the thousands per second range,
+with very little execution overhead. Logging is more appropriate for
+very high-level analysis of less frequent events: user accesses,
+exceptional conditions (e.g., errors, warnings), database
+transactions, instant messaging communications, etc. More formally,
+logging is one of several use cases that can be accomplished with
+tracing.
+
+The list of recorded events inside a trace file may be read manually
+like a log file for the maximum level of detail, but it is generally
+much more interesting to perform application-specific analyses to
+produce reduced statistics and graphs that are useful to resolve a
+given problem. Trace viewers and analysers are specialized tools which
+achieve this.
+
+So, in the end, this is what LTTng is: a powerful, open source set of
+tools to trace the Linux kernel and user applications. LTTng is
+composed of several components actively maintained and developed by
+its community.
+
+Excluding proprietary solutions, a few competing software tracers
+exist for Linux.
+<a href="https://www.kernel.org/doc/Documentation/trace/ftrace.txt" class="ext">ftrace</a>
+is the de facto function tracer of the Linux kernel.
+<a href="http://linux.die.net/man/1/strace" class="ext">strace</a>
+is able to record all system calls made by a user process.
+<a href="https://sourceware.org/systemtap/" class="ext">SystemTap</a>
+is a Linux kernel and user space tracer which uses custom user scripts
+to produce plain text traces.
+<a href="http://www.sysdig.org/" class="ext">sysdig</a>
+also uses scripts, written in Lua, to trace and analyze the Linux
+kernel.
+
+The main distinctive features of LTTng is that it produces correlated
+kernel and user space traces, as well as doing so with the lowest
+overhead amongst other solutions. It produces trace files in the
+<a href="http://www.efficios.com/ctf" class="ext"><abbr title="Common Trace Format">CTF</abbr></a>
+format, an optimized file format for production and analyses of
+multi-gigabyte data. LTTng is the result of close to 10 years of
+active development by a community of passionate developers. It is
+currently available on all major desktop and embedded Linux
+distributions.
+
+The main interface for tracing control is a single command line tool
+named `lttng`. The latter can create several tracing sessions,
+enable/disable events on the fly, filter them efficiently with custom
+user expressions, start/stop tracing and do much more. Traces can be
+recorded on disk or sent over the network, kept totally or partially,
+and viewed once tracing is inactive or in real-time.
+
+[Install LTTng now](#doc-installing-lttng) and start tracing!
--- /dev/null
+---
+id: preface
+---
+
+<div class="copyright">
+ <p>
+ Copyright © 2014 The LTTng Project
+ </p>
+
+ <p>
+ This work is licensed under a
+ <a class="ext" href="http://creativecommons.org/licenses/by/4.0/">Creative
+ Commons Attribution 4.0 International License</a>.
+ </p>
+</div>
+
+
+## Welcome!
+
+Welcome to the **LTTng Documentation**!
+
+The _Linux Trace Toolkit: next generation_
+is an open source system software package for correlated tracing of the
+Linux kernel, user applications and libraries. LTTng consists of kernel
+modules (for Linux kernel tracing) and dynamically loaded libraries (for
+user application and library tracing). It is controlled by a session
+daemon, which receives commands from a command line interface.
+
+
+### Version
+
+This online LTTng Documentation is always up-to-date with the most
+recent releases of LTTng packages. Older versions are always available
+as tagged commits in the documentation's
+<a href="https://github.com/lttng/lttng-docs" class="ext">official Git
+repository</a>.
+
+
+### Convention
+
+Function and argument names, variable names, command names,
+file system paths, file names and other precise strings are written
+using a <code>monospaced typeface</code> in this document. An
+<code><em>italic</em> word</code> within such a block is a
+placeholder, usually described in the following sentence.
+
+Practical tips and sidenotes are given throughout the document using a
+blue background:
+
+<div class="tip">
+<p><span class="t">Tip:</span>Make sure you read the tips.</p>
+</div>
+
+Terminal boxes are used to show command lines:
+
+<pre class="term">
+echo This is a terminal box
+</pre>
+
+Typical command prompts, like `$` and `#`, are not shown in terminal
+boxes to make copy/paste operations easier, especially for multiline
+commands which may be copied and pasted as is in a user's terminal.
+Commands to be executed as a root user begin with `sudo`.
+
+
+### Target audience
+
+The material of this documentation is appropriate for intermediate to
+advanced software developers working in a Linux environment who are
+interested in efficient software tracing. LTTng may also be worth a
+try for students interested in the inner mechanics of their systems.
+
+Readers who do not have a programming background may wish to skip
+everything related to instrumentation, which requires, most of the
+time, some C language skills.
+
+<div class="tip">
+<p><span class="t">Note to readers:</span>This is an <strong>open
+documentation</strong>: its source is available in a
+<a class="ext" href="https://github.com/lttng/lttng-docs">public Git
+repository</a>. Should you find any error in the contents of this text,
+any grammatical mistake or any dead link, we would be very grateful if
+you would fill a GitHub issue for it or, even better, contribute a patch
+to this documentation using a GitHub pull request.</p>
+</div>
+
+### Chapter descriptions
+
+What follows is a list of brief descriptions of this documentation's
+chapters. The latter are ordered in such a way as to make the reading
+as linear as possible.
+
+ 1. [Nuts and bolts](#doc-nuts-and-bolts) explains the
+ rudiments of software tracing and the rationale behind the
+ LTTng project.
+ 2. [Installing LTTng](#doc-installing-lttng) is divided into
+ sections describing the steps needed to get a working installation
+ of LTTng packages for common Linux distributions and from its
+ source.
+ 3. [Getting started](#doc-getting-started) is a very concise guide to
+ get started quickly with LTTng kernel and user space tracing. This
+ chapter is recommended if you're new to LTTng or software tracing
+ in general.
+ 4. [Understanding LTTng](#doc-understanding-lttng) deals with some
+ core concepts and components of the LTTng suite. Understanding
+ those is important since the next chapter assumes you're familiar
+ with them.
+ 5. [Using LTTng](#doc-using-lttng) is a complete user guide of the
+ LTTng project. It shows in great details how to instrument user
+ applications and the Linux kernel, how to control tracing sessions
+ using the `lttng` command line tool and miscellaneous practical use
+ cases.
+ 6. [Reference](#doc-reference) contains references of LTTng components,
+ like links to online manpages and various APIs.
+
+We recommend that you read the above chapters in this order, although
+some of them may be skipped depending on your situation. You may skip
+[Nuts and bolts](#doc-nuts-and-bolts) if you're familiar with tracing
+and LTTng. Also, you may jump over
+[Installing LTTng](#doc-installing-lttng) if LTTng is already properly
+installed on your target system.
+
+
+### Acknowledgements
+
+A few people made the online LTTng Documentation possible.
+
+Philippe Proulx wrote and formatted most of the text.
+Daniel U. Thibault, from the
+<abbr title="Defence Research and Development Canada">DRDC</abbr>,
+wrote an open guide called <em>LTTng: The Linux Trace Toolkit Next
+Generation — A Comprehensive User's Guide (version 2.3
+edition)</em> which was mostly used to complete parts of the
+[Understanding LTTng](#doc-understanding-lttng) chapter and for a few
+passages here and there.
+The whole <a href="http://www.efficios.com/" class="ext">EfficiOS</a>
+team (Christian Babeux, Antoine Busque, Julien Desfossez,
+Mathieu Desnoyers, Jérémie Galarneau and David Goulet) made essential
+reviews of the whole document.
+
+We sincerely thank everyone who helped make this documentation what
+it is. We hope you enjoy reading it as much as we did writing it.
--- /dev/null
+---
+id: reference
+---
+
+This chapter presents various references for LTTng packages such as links
+to online manpages, tables needed by the rest of the text, descriptions
+of library functions, etc.
--- /dev/null
+---
+id: lttng-modules-ref
+---
+
+This section presents references of the LTTng-modules package.
--- /dev/null
+---
+id: lttng-modules-tp-fast-assign
+---
+
+This table describes possible entries for the `TP_fast_assign()` part
+of `LTTNG_TRACEPOINT_EVENT()`:
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th>Macro</th>
+ <th>Description/arguments</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">tp_assign(<span class="arg">d</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Assignment of C expression <code class="arg">s</code>
+ to tracepoint field <code class="arg">d</code>
+ </p>
+ <ul>
+ <li>
+ <code class="arg">d</code> name of destination
+ tracepoint field
+ </li>
+ <li>
+ <code class="arg">s</code> source C expression
+ (may refer to tracepoint arguments)
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">tp_memcpy(<span class="arg">d</span>, <span class="arg">s</span>, <span class="arg">l</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Memory copy of <code class="arg">l</code> bytes from
+ <code class="arg">s</code> to tracepoint field
+ <code class="arg">d</code> (use with array fields)
+ </p>
+ <ul>
+ <li>
+ <code class="arg">d</code> name of destination
+ tracepoint field
+ </li>
+ <li>
+ <code class="arg">s</code> source C expression
+ (may refer to tracepoint arguments)
+ </li>
+ <li>
+ <code class="arg">l</code> number of bytes to
+ copy
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">tp_memcpy_from_user(<span class="arg">d</span>, <span class="arg">s</span>, <span class="arg">l</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Memory copy of <code class="arg">l</code> bytes from
+ user space <code class="arg">s</code> to tracepoint field
+ <code class="arg">d</code> (use with array fields)
+ </p>
+ <ul>
+ <li>
+ <code class="arg">d</code> name of destination
+ tracepoint field
+ </li>
+ <li>
+ <code class="arg">s</code> source C expression
+ (may refer to tracepoint arguments)
+ </li>
+ <li>
+ <code class="arg">l</code> number of bytes to
+ copy
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">tp_memcpy_dyn(<span class="arg">d</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Memory copy of dynamically-sized array
+ from <code class="arg">s</code> to tracepoint field
+ <code class="arg">d</code>; number of bytes is
+ known from the field's length expression (use with
+ dynamically-sized array fields)
+ </p>
+ <ul>
+ <li>
+ <code class="arg">d</code> name of destination
+ tracepoint field
+ </li>
+ <li>
+ <code class="arg">s</code> source C expression
+ (may refer to tracepoint arguments)
+ </li>
+ <li>
+ <code class="arg">l</code> number of bytes to
+ copy
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">tp_strcpy(<span class="arg">d</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ String copy of <code class="arg">s</code>
+ to tracepoint field <code class="arg">d</code>
+ (use with string fields)
+ </p>
+ <ul>
+ <li>
+ <code class="arg">d</code> name of destination
+ tracepoint field
+ </li>
+ <li>
+ <code class="arg">s</code> source C expression
+ (may refer to tracepoint arguments)
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
--- /dev/null
+---
+id: lttng-modules-tp-struct-entry
+---
+
+This table describes possible entries for the `TP_STRUCT__entry()` part
+of `LTTNG_TRACEPOINT_EVENT()`:
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th>Macro</th>
+ <th>Description/arguments</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__field(<span class="arg">t</span>, <span class="arg">n</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Standard integer, displayed in base 10</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> integer C type
+ (<code>int</code>, <code>unsigned char</code>,
+ <code>size_t</code>, etc.)
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__field_hex(<span class="arg">t</span>, <span class="arg">n</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Standard integer, displayed in base 16</p>
+ <ul>
+ <li><code class="arg">t</code> integer C type</li>
+ <li><code class="arg">n</code> field name</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__field_oct(<span class="arg">t</span>, <span class="arg">n</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Standard integer, displayed in base 8</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> integer C type
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__field_network(<span class="arg">t</span>, <span class="arg">n</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Integer in network byte order (big endian),
+ displayed in base 10
+ </p>
+ <ul>
+ <li>
+ <code class="arg">t</code> integer C type
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__field_network_hex(<span class="arg">t</span>, <span class="arg">n</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Integer in network byte order (big endian),
+ displayed in base 16
+ </p>
+ <ul>
+ <li>
+ <code class="arg">t</code> integer C type
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__array(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Statically-sized array, elements displayed in base 10</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> array element C type
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">s</code> number of elements</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__array_hex(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Statically-sized array, elements displayed in base 16</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> array element C type
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">s</code> number of elements</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__array_text(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Statically-sized array, displayed as text</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> array element C type
+ (always <code>char</code>)
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">s</code> number of elements</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__dynamic_array(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Dynamically-sized array, displayed in base 10</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> array element C type
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">s</code> length C expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__dynamic_array_hex(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Dynamically-sized array, displayed in base 16</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> array element C type
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">s</code> length C expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__dynamic_array_text(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Dynamically-sized array, displayed as text</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> array element C type
+ (always <code>char</code>)
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">s</code> length C expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">__string(<span class="arg">n</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Null-terminated string; undefined behavior
+ if <code class="arg">s</code> is <code>NULL</code>
+ </p>
+ <ul>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">s</code> string source (pointer)</li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+The above macros should cover the majority of cases. For advanced items,
+see `probes/lttng-events.h`.
--- /dev/null
+---
+id: lttng-ust-ref
+---
+
+This section presents references of the LTTng-UST package.
--- /dev/null
+---
+id: liblttng-ust
+---
+
+The LTTng-UST library, or `liblttng-ust`, is the main shared object
+against which user applications are linked to make LTTng user space
+tracing possible.
+
+The [C application](#doc-c-application) guide shows the complete
+process to instrument, build and run a C/C++ application using
+LTTng-UST, while this section contains a few important tables.
--- /dev/null
+---
+id: liblttng-ust-tp-fields
+---
+
+The available macros to define tracepoint fields, which should be listed
+within `TP_FIELDS()` in `TRACEPOINT_EVENT()`, are:
+
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th>Macro</th>
+ <th>Description/arguments</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">ctf_integer(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>)</code></li>
+ <li><code class="no-bg">ctf_integer_nowrite(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Standard integer, displayed in base 10</p>
+ <ul>
+ <li>
+ <code class="arg"><strong>t</strong></code> integer C type
+ (<code>int</code>, <code>long</code>,
+ <code>size_t</code>, etc.)
+ </li>
+ <li><code class="arg"><strong>n</strong></code> field name</li>
+ <li><code class="arg"><strong>e</strong></code> argument expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">ctf_integer_hex(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>)</code></td>
+ <td>
+ <p>Standard integer, displayed in base 16</p>
+ <ul>
+ <li><code class="arg"><strong>t</strong></code> integer C type</li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">ctf_integer_network(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>)</code></td>
+ <td>
+ <p>
+ Integer in network byte order (big endian),
+ displayed in base 10
+ </p>
+ <ul>
+ <li><code class="arg">t</code> integer C type</li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">ctf_integer_network_hex(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>)</code></td>
+ <td>
+ <p>
+ Integer in network byte order, displayed
+ in base 16</p>
+ <ul>
+ <li><code class="arg">t</code> integer C type</li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">ctf_float(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>)</code></li>
+ <li><code class="no-bg">ctf_float_nowrite(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Floating point number</p>
+ <ul>
+ <li>
+ <code class="arg">t</code> floating point number
+ C type (<code>float</code>, <code>double</code>)
+ </li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">ctf_string(<span class="arg">n</span>, <span class="arg">e</span>)</code></li>
+ <li><code class="no-bg">ctf_string_nowrite(<span class="arg">n</span>, <span class="arg">e</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Null-terminated string; undefined behavior if
+ <code class="arg">e</code> is <code>NULL</code>
+ </p>
+ <ul>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">ctf_array(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>, <span class="arg">s</span>)</code></li>
+ <li><code class="no-bg">ctf_array_nowrite(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>Statically-sized array of integers</p>
+ <ul>
+ <li><code class="arg">t</code> array element C type</li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ <li><code class="arg">s</code> number of elements</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">ctf_array_text(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>, <span class="arg">s</span>)</code></li>
+ <li><code class="no-bg">ctf_array_nowrite_text(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>, <span class="arg">s</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Statically-sized array, printed as text; no need to be
+ null-terminated
+ </p>
+ <ul>
+ <li><code class="arg">t</code> array element C type (always <code>char</code>)</li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ <li><code class="arg">s</code> number of elements</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">ctf_sequence(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>, <span class="arg">T</span>, <span class="arg">E</span>)</code></li>
+ <li><code class="no-bg">ctf_sequence_nowrite(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>, <span class="arg">T</span>, <span class="arg">E</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Dynamically-sized array of integers; type of
+ <code class="arg">E</code> needs to be unsigned
+ </p>
+ <ul>
+ <li><code class="arg">t</code> sequence element C type</li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ <li><code class="arg">T</code> length expression C type</li>
+ <li><code class="arg">E</code> length expression</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><code class="no-bg">ctf_sequence_text(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>, <span class="arg">T</span>, <span class="arg">E</span>)</code></li>
+ <li><code class="no-bg">ctf_sequence_text_nowrite(<span class="arg">t</span>, <span class="arg">n</span>, <span class="arg">e</span>, <span class="arg">T</span>, <span class="arg">E</span>)</code></li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Dynamically-sized array, displayed as text; no need to
+ be null-terminated; undefined behavior if
+ <code class="arg">e</code> is <code>NULL</code></p>
+ <ul>
+ <li><code class="arg">t</code> sequence element C type (always <code>char</code>)</li>
+ <li><code class="arg">n</code> field name</li>
+ <li><code class="arg">e</code> argument expression</li>
+ <li><code class="arg">T</code> length expression C type</li>
+ <li><code class="arg">E</code> length expression</li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+The `_nowrite` versions omit themselves from the session trace, but are
+otherwise identical. This means the `_nowrite` fields won't be written
+in the recorded trace. Their primary purpose is to make some
+of the event context available to the
+[event filters](#doc-enabling-disabling-events) without having to
+commit the data to sub-buffers.
--- /dev/null
+---
+id: liblttng-ust-tracepoint-loglevel
+---
+
+The following table shows the available log level values for the
+`TRACEPOINT_LOGLEVEL()` macro:
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th>Enum label</th>
+ <th>Enum value</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code class="no-bg">TRACE_EMERG</code></td>
+ <td>0</td>
+ <td>System is unusable</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_ALERT</code></td>
+ <td>1</td>
+ <td>Action must be taken immediately</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_CRIT</code></td>
+ <td>2</td>
+ <td>Critical conditions</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_ERR</code></td>
+ <td>3</td>
+ <td>Error conditions</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_WARNING</code></td>
+ <td>4</td>
+ <td>Warning conditions</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_NOTICE</code></td>
+ <td>5</td>
+ <td>Normal, but significant, condition</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_INFO</code></td>
+ <td>6</td>
+ <td>Informational message</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_DEBUG_SYSTEM</code></td>
+ <td>7</td>
+ <td>Debug information with system-level scope (set of programs)</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_DEBUG_PROGRAM</code></td>
+ <td>8</td>
+ <td>Debug information with program-level scope (set of processes)</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_DEBUG_PROCESS</code></td>
+ <td>9</td>
+ <td>Debug information with process-level scope (set of modules)</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_DEBUG_MODULE</code></td>
+ <td>10</td>
+ <td>Debug information with module (executable/library) scope (set of units)</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_DEBUG_UNIT</code></td>
+ <td>11</td>
+ <td>Debug information with compilation unit scope (set of functions)</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_DEBUG_FUNCTION</code></td>
+ <td>12</td>
+ <td>Debug information with function-level scope</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_DEBUG_LINE</code></td>
+ <td>13</td>
+ <td>Debug information with line-level scope (<code>TRACEPOINT_EVENT</code> default)</td>
+ </tr>
+ <tr>
+ <td><code class="no-bg">TRACE_DEBUG</code></td>
+ <td>14</td>
+ <td>Debug-level message</td>
+ </tr>
+ </tbody>
+</table>
+
+Higher log level numbers imply the most verbosity (expect higher tracing
+throughput). Log levels 0 through 6 and log level 14 match
+<a href="http://man7.org/linux/man-pages/man3/syslog.3.html" class="ext">syslog</a>
+level semantics. Log levels 7 through 13 offer more fine-grained
+selection of debug information.
--- /dev/null
+---
+id: online-lttng-manpages
+---
+
+LTTng packages currently install the following manpages, available
+online using the links below:
+
+ * **LTTng-tools**
+ * <a href="/man/1/lttng" class="ext">`lttng`</a>
+ * <a href="/man/8/lttng-sessiond" class="ext">`lttng-sessiond`</a>
+ * <a href="/man/8/lttng-relayd" class="ext">`lttng-relayd`</a>
+ * **LTTng-UST**
+ * <a href="/man/1/lttng-gen-tp" class="ext">`lttng-gen-tp`</a>
+ * <a href="/man/3/lttng-ust" class="ext">`lttng-ust`</a>
+ * <a href="/man/3/lttng-ust-cyg-profile" class="ext">`lttng-ust-cyg-profile`</a>
+ * <a href="/man/3/lttng-ust-cyg-dl" class="ext">`lttng-ust-cyg-dl`</a>
--- /dev/null
+---
+id: channel-buffering-schemes
+---
+
+In the user space tracing domain, two **buffering schemes** are
+available when creating a channel:
+
+ * **Per-PID buffering**: keep one ring buffer per process.
+ * **Per-UID buffering**: keep one ring buffer for all processes of
+ a single user.
+
+The per-PID buffering scheme will consume more memory than the per-UID
+option if more than one process is instrumented for LTTng-UST. However,
+per-PID buffering ensures that one process having a high event
+throughput won't fill all the shared sub-buffers, only its own.
+
+The Linux kernel tracing domain only has one available buffering scheme
+which is to use a single ring buffer for the whole system.
--- /dev/null
+---
+id: channel-overwrite-mode-vs-discard-mode
+---
+
+As previously mentioned, a channel's ring buffer is divided into many
+equally sized sub-buffers.
+
+As events occur, they are serialized as trace data into a specific
+sub-buffer (yellow arc in the following animation) until it is full:
+when this happens, the sub-buffer is marked as consumable (red) and
+another, _empty_ (white) sub-buffer starts receiving the following
+events. The marked sub-buffer will be consumed eventually by a consumer
+daemon (returns to white).
+
+<script type="text/javascript">
+ document.write('<div class="img img-50" id="docsvg-channel-subbuf-anim"></div>');
+
+ $(document).ready(function() {
+ var doc = SVG('docsvg-channel-subbuf-anim');
+
+ doc.viewbox(0, 0, 2, 2);
+
+ var rb = rbBuildStdAnimated(doc, {
+ div: 5,
+ oR: 0.97,
+ evDur: 300,
+ evPerSubBuf: 6,
+ consumerAfter: 10
+ });
+
+ rb.getGroup().move(1, 1);
+ });
+</script>
+
+<noscript>
+ <div class="err">
+ <p>
+ <span class="t">Oops!</span>JavaScript must be enabled in
+ order to view animations.
+ </p>
+ </div>
+</noscript>
+
+In an ideal world, sub-buffers are consumed faster than filled, like it
+is the case above. In the real world, however, all sub-buffers could be
+full at some point, leaving no space to record the following events. By
+design, LTTng is a _non-blocking_ tracer: when no empty sub-buffer
+exists, losing events is acceptable when the alternative would be to
+cause substantial delays in the instrumented application's execution.
+LTTng privileges performance over integrity, aiming at perturbing the
+traced system as little as possible in order to make tracing of subtle
+race conditions and rare interrupt cascades possible.
+
+When it comes to losing events because no empty sub-buffer is available,
+the channel's _event loss mode_ determines what to do amongst:
+
+ * **Discard**: drop the newest events until a sub-buffer is released.
+ * **Overwrite**: clear the sub-buffer containing the oldest recorded
+ events and start recording the newest events there. This mode is
+ sometimes called _flight recorder mode_ because it behaves like a
+ flight recorder: always keep a fixed amount of the latest data.
+
+Which mechanism you should choose depends on your context: prioritize
+the newest or the oldest events in the ring buffer?
+
+Beware that, in overwrite mode, a whole sub-buffer is abandoned as soon
+as a new event doesn't find an empty sub-buffer, whereas in discard
+mode, only the event that doesn't fit is discarded.
+
+Also note that a count of lost events will be incremented and saved in
+the trace itself when an event is lost in discard mode, whereas no
+information is kept when a sub-buffer gets overwritten before being
+committed.
+
+There are known ways to decrease your probability of losing events. The
+next section shows how tuning the sub-buffers count and size can be
+used to virtually stop losing events.
--- /dev/null
+---
+id: channel-subbuf-size-vs-subbuf-count
+---
+
+For each channel, an LTTng user may set its number of sub-buffers and
+their size.
+
+Note that there is a noticeable tracer's CPU overhead introduced when
+switching sub-buffers (marking a full one as consumable and switching
+to an empty one for the following events to be recorded). Knowing this,
+the following list presents a few practical situations along with how
+to configure sub-buffers for them:
+
+ * **High event throughput**: in general, prefer bigger sub-buffers to
+ lower the risk of losing events. Having bigger sub-buffers will
+ also ensure a lower sub-buffer switching frequency. The number of
+ sub-buffers is only meaningful if the channel is in overwrite mode:
+ in this case, if a sub-buffer overwrite happens, you will still have
+ the other sub-buffers left unaltered.
+ * **Low event throughput**: in general, prefer smaller sub-buffers
+ since the risk of losing events is already low. Since events
+ happen less frequently, the sub-buffer switching frequency should
+ remain low and thus the tracer's overhead should not be a problem.
+ * **Low memory system**: if your target system has a low memory
+ limit, prefer fewer first, then smaller sub-buffers. Even if the
+ system is limited in memory, you want to keep the sub-buffers as
+ big as possible to avoid a high sub-buffer switching frequency.
+
+You should know that LTTng uses CTF as its trace format, which means
+event data is very compact. For example, the average LTTng Linux kernel
+event weights about 32 bytes. A sub-buffer size of 1 MiB is
+thus considered big.
+
+The previous situations highlight the major trade-off between a few big
+sub-buffers and more, smaller sub-buffers: sub-buffer switching
+frequency vs. how much data is lost in overwrite mode. Assuming a
+constant event throughput and using the overwrite mode, the two
+following configurations have the same ring buffer total size:
+
+<script type="text/javascript">
+ document.write('<div class="img img-100" id="docsvg-channel-subbuf-size-vs-count-anim"></div>');
+
+ $(document).ready(function() {
+ var doc = SVG('docsvg-channel-subbuf-size-vs-count-anim');
+
+ doc.viewbox(0, 0, 4.25, 2);
+
+ var rb2 = rbBuildStdAnimated(doc, {
+ div: 2,
+ oR: 0.97,
+ evDur: 300,
+ evPerSubBuf: 16,
+ consumerAfter: 25
+ });
+ var rb16 = rbBuildStdAnimated(doc, {
+ div: 8,
+ oR: 0.97,
+ evDur: 300,
+ evPerSubBuf: 4,
+ consumerAfter: 6
+ });
+
+ rb2.getGroup().move(1, 1);
+ rb16.getGroup().move(3.25, 1);
+ });
+</script>
+
+<noscript>
+ <div class="err">
+ <p>
+ <span class="t">Oops!</span>JavaScript must be enabled in
+ order to view animations.
+ </p>
+ </div>
+</noscript>
+
+ * **2 sub-buffers of 4 MiB each** lead to a very low sub-buffer
+ switching frequency, but if a sub-buffer overwrite happens, half of
+ the recorded events so far (4 MiB) are definitely lost.
+ * **8 sub-buffers of 1 MiB each** lead to 4 times the tracer's
+ overhead as the previous configuration, but if a sub-buffer
+ overwrite happens, only the eighth of events recorded so far are
+ definitely lost.
+
+In discard mode, the sub-buffers count parameter is pointless: use two
+sub-buffers and set their size according to the requirements of your
+situation.
--- /dev/null
+---
+id: channel-switch-timer
+---
+
+The _switch timer_ period is another important configurable feature of
+channels to ensure periodic sub-buffer flushing.
+
+When the _switch timer_ fires, a sub-buffer switch happens. This timer
+may be used to ensure that event data is consumed and committed to
+trace files periodically in case of a low event throughput:
+
+<script type="text/javascript">
+ document.write('<div class="img img-50" id="docsvg-channel-switch-timer"></div>');
+
+ $(document).ready(function() {
+ var doc = SVG('docsvg-channel-switch-timer');
+
+ doc.viewbox(0, 0, 2, 2);
+
+ var div = 4;
+ var evDur = 1000;
+ var rb = rbBuildStd(doc, div, 0.97);
+ var switchText = doc.text('Switch!');
+
+ switchText.font({
+ 'size': 0.1,
+ 'weight': 'bold'
+ });
+ switchText.center(1, 1);
+ switchText.attr({
+ 'opacity': 0,
+ 'fill': '#b02b2c'
+ });
+
+ var curSubBuf = 0;
+ var totalEvents = 0;
+ var onEventAdded = function() {
+ totalEvents++;
+
+ var curSubBufEvCount = rb.getSubBufEvCount(curSubBuf % div);
+
+ if (totalEvents >= 4) {
+ // switch timer fires
+ switchText.attr({
+ 'opacity': 1
+ });
+ switchText.animate(500, '<>', 1000).attr({
+ 'opacity': 0
+ });
+ rb.markSubBuf(curSubBuf % div, 'full');
+
+ var lastFullSubBuf = curSubBuf;
+
+ setTimeout(function() {
+ rb.consumeSubBuf(lastFullSubBuf % div);
+ }, 3000);
+ totalEvents = 0;
+ curSubBuf++;
+ rb.markSubBuf(curSubBuf % div, 'cur');
+ }
+
+ rb.addEvent(curSubBuf % div, evDur, onEventAdded);
+ };
+
+ rb.addEvent(0, evDur, onEventAdded);
+ rb.markSubBuf(0, 'cur');
+
+ rb.getGroup().move(1, 1);
+ });
+</script>
+
+<noscript>
+ <div class="err">
+ <p>
+ <span class="t">Oops!</span>JavaScript must be enabled in
+ order to view animations.
+ </p>
+ </div>
+</noscript>
+
+It's also convenient when big sub-buffers are used to cope with
+sporadic high event throughput, even if the throughput is normally
+lower.
--- /dev/null
+---
+id: channel
+---
+
+A _channel_ is a set of events with specific parameters and potential
+added context information. Channels have unique names per domain within
+a tracing session. A given event is always registered to at least one
+channel; having an enabled event in two channels will produce a trace
+with this event recorded twice everytime it occurs.
+
+Channels may be individually enabled or disabled. Occurring events of
+a disabled channel will never make it to recorded events.
+
+The fundamental role of a channel is to keep a shared ring buffer, where
+events are eventually recorded by the tracer and consumed by a consumer
+daemon. This internal ring buffer is divided into many sub-buffers of
+equal size.
+
+Channels, when created, may be fine-tuned thanks to a few parameters,
+many of them related to sub-buffers. The following subsections explain
+what those parameters are and in which situations you should manually
+adjust them.
--- /dev/null
+---
+id: domain
+---
+
+A tracing _domain_ is the official term the LTTng project uses to
+designate a tracer category.
+
+There are currently three known domains:
+
+ * Linux kernel
+ * user space
+ * Java Util Logging (JUL)
+
+Different tracers expose common features in their own interfaces, but,
+from a user's perspective, you still need to target a specific type of
+tracer to perform some actions. For example, since both kernel and user
+space tracers support named tracepoints (probes manually inserted in
+source code), you need to specify which one is concerned when enabling
+an event because both domains could have existing events with the same
+name.
+
+Some features are not available in all domains. Filtering enabled
+events using custom expressions, for example, is currently not
+supported in the kernel domain, but support could be added in the
+future.
--- /dev/null
+---
+id: event
+---
+
+An _event_, in LTTng's realm, is a term often used metonymically,
+having multiple definitions depending on the context:
+
+ 1. When tracing, an event is a _point in space-time_. Space, in a
+ tracing context, is the set of all executable positions of a
+ compiled application by a logical processor. When a program is
+ executed by a processor and some instrumentation point, or
+ _probe_, is encountered, an event occurs. This event is accompanied
+ by some contextual payload (values of specific variables at this
+ point of execution) which may or may not be recorded.
+ 2. In the context of a recorded trace file, the term _event_ implies
+ a _recorded event_.
+ 3. When configuring a tracing session, _enabled events_ refer to
+ specific rules which could lead to the transfer of actual
+ occurring events (1) to recorded events (2).
+
+The whole [Core concepts](#doc-core-concepts) section focusses on the
+third definition. An event is always registered to _one or more_
+channels and may be enabled or disabled at will per channel. A disabled
+event will never lead to a recorded event, even if its channel
+is enabled.
+
+An event (3) is enabled with a few conditions that must _all_ be met
+when an event (1) happens in order to generate a recorded event (2):
+
+ 1. A _probe_ or group of probes in the traced application must be
+ executed.
+ 2. **Optionally**, the probe must have a log level matching a
+ log level range specified when enabling the event.
+ 3. **Optionally**, the occurring event must satisfy a custom
+ expression, or _filter_, specified when enabling the event.
+
+The following illustration summarizes how tracing sessions, domains,
+channels and events are related:
+
+<div class="img img-90">
+<object data="/images/docs/core-concepts.svg" type="image/svg+xml">
+ <img src="/images/docs/core-concepts.svg">
+</object>
+</div>
+
+This diagram also shows how events may be individually enabled/disabled
+(green/grey) and how a given event may be registered to more than one
+channel.
--- /dev/null
+---
+id: core-concepts
+---
+
+This section explains the various elementary concepts a user has to deal
+with when using LTTng. They are:
+
+ * [tracing session](#doc-tracing-session)
+ * [domain](#doc-domain)
+ * [channel](#doc-channel)
+ * [event](#doc-event)
--- /dev/null
+---
+id: tracing-session
+---
+
+A _tracing session_ is—like any session—a container of
+state. Anything that is done when tracing using LTTng happens in the
+scope of a tracing session. In this regard, it is analogous to a bank
+website's session: you can't interact online with your bank account
+unless you are logged in a session, except for reading a few static
+webpages (LTTng, too, can report some static information that does not
+need a created tracing session).
+
+A tracing session holds the following attributes and objects (some of
+which are described in the following sections):
+
+ * a name
+ * the tracing state (tracing started or stopped)
+ * the trace data output path/URL (local path or sent over the network)
+ * a mode (normal, snapshot or live)
+ * the snapshot output paths/URLs (if applicable)
+ * for each [domain](#doc-domain), a list of [channels](#doc-channel)
+ * for each channel:
+ * a name
+ * the channel state (enabled or disabled)
+ * its parameters (event loss mode, sub-buffers size and count,
+ timer periods, output type, trace files size and count, etc.)
+ * a list of added context information
+ * a list of [events](#doc-event)
+ * for each event:
+ * its state (enabled or disabled)
+ * a list of instrumentation points (tracepoints, system calls,
+ dynamic probes, etc.)
+ * associated log levels
+ * a filter expression
+
+All this information is completely isolated between tracing sessions.
+
+Conceptually, a tracing session is a per-user object; the
+[Plumbing](#doc-plumbing) section shows how this is actually
+implemented. Any user may create as many concurrent tracing sessions
+as desired. As you can see in the list above, even the tracing state
+is a per-tracing session attribute, so that you may trace your target
+system/application in a given tracing session with a specific
+configuration while another one stays inactive.
+
+The trace data generated in a tracing session may be either saved
+to disk, sent over the network or not saved at all (in which case
+snapshots may still be saved to disk or sent to a remote machine).
--- /dev/null
+---
+id: understanding-lttng
+---
+
+If you're going to use LTTng in any serious way, it is fundamental that
+you become familiar with its core concepts. Technical terms like
+_tracing sessions_, _domains_, _channels_ and _events_ are used over
+and over in the [Using LTTng](#doc-using-lttng) chapter,
+and it is assumed that you understand what they mean when reading it.
+
+LTTng, as you already know, is a _toolkit_. It would be wrong
+to call it a simple _tool_ since it is composed of multiple interacting
+components. This chapter also describes the latter, providing details
+about their respective roles and how they connect together to form
+the current LTTng ecosystem.
--- /dev/null
+---
+id: plumbing
+---
+
+The previous section described the concepts at the heart of LTTng.
+This section summarizes LTTng's implementation: how those objects are
+managed by different applications and libraries working together to
+form the toolkit.
--- /dev/null
+---
+id: liblttng-ctl-lttng
+---
+
+The LTTng control library, `liblttng-ctl`, can be used to communicate
+with the session daemon using a C API that hides the underlying
+protocol's details. `liblttng-ctl` is part of LTTng-tools.
+
+`liblttng-ctl` may be used by including its "master" header:
+
+~~~ c
+#include <lttng/lttng.h>
+~~~
+
+Some objects are referred by name (C string), such as tracing sessions,
+but most of them require creating a handle first using
+`lttng_create_handle()`. The best available developer documentation for
+`liblttng-ctl` is, for the moment, its installed header files as such.
+Every function/structure is thoroughly documented.
+
+The `lttng` program is the _de facto_ standard user interface to
+control LTTng tracing sessions. `lttng` uses `liblttng-ctl` to
+communicate with session daemons behind the scenes.
+<a href="/man/1/lttng" class="ext">Its manpage</a> is exhaustive, as
+well as its command line help (<code>lttng <em>cmd</em> --help</code>,
+where <code><em>cmd</em></code> is the command name).
+
+The [Controlling tracing](#doc-controlling-tracing) section is a feature
+tour of the `lttng` tool.
--- /dev/null
+---
+id: lttng-consumerd
+---
+
+The _consumer daemon_, or `lttng-consumerd`, is a program sharing some
+ring buffers with user applications or the LTTng kernel modules to
+collect trace data and output it at some place (on disk or sent over
+the network to an LTTng relay daemon).
+
+Consumer daemons are created by a session daemon as soon as events are
+enabled within a tracing session, well before tracing is activated
+for the latter. Entirely managed by session daemons,
+consumer daemons survive session destruction to be reused later,
+should a new tracing session be created. Consumer daemons are always
+owned by the same user as their session daemon. When its owner session
+daemon is killed, the consumer daemon also exits. This is because
+the consumer daemon is always the child process of a session daemon.
+Consumer daemons should never be started manually. For this reason,
+they are not installed in one of the usual locations listed in the
+`PATH` environment variable. `lttng-sessiond` has, however, a
+<a href="/man/8/lttng-sessiond" class="ext">bunch of options</a> to
+specify custom consumer daemon paths if, for some reason, a consumer
+daemon other than the default installed one is needed.
+
+There are up to two running consumer daemons per user, whereas only one
+session daemon may run per user. This is because each process has
+independent bitness: if the target system runs a mixture of 32-bit and
+64-bit processes, it is more efficient to have separate corresponding
+32-bit and 64-bit consumer daemons. The `root` user is an exception: it
+may have up to _three_ running consumer daemons: 32-bit and 64-bit
+instances for its user space applications and one more reserved for
+collecting kernel trace data.
+
+As new tracing domains are added to LTTng, the development community's
+intent is to minimize the need for additionnal consumer daemon instances
+dedicated to them. For instance, the Java Util Logging (JUL) domain
+events are in fact mapped to the user space domain, thus tracing this
+particular domain is handled by existing user space domain consumer
+daemons.
--- /dev/null
+---
+id: lttng-modules
+---
+
+The LTTng Linux kernel modules provide everything needed to trace the
+Linux kernel: various probes, a ring buffer implementation for a
+consumer daemon to read trace data and the tracer itself.
+
+Only in exceptional circumstances should you ever need to load the
+LTTng kernel modules manually: it is normally the responsability of
+`root`'s session daemon to do so. Even if you were to develop your
+own LTTng probe module—for tracing a custom kernel or some kernel
+module (this topic is covered in the
+[Linux kernel](#doc-instrumenting-linux-kernel) instrumenting guide of
+the [Using LTTng](#doc-using-lttng) chapter)—you
+should use the `--extra-kmod-probes` option of the session daemon to
+append your probe to the default list. The session and consumer daemons
+of regular users do not interact with the LTTng kernel modules at all.
+
+LTTng kernel modules are installed, by default, in
+<code>/usr/lib/modules/<em>release</em>/extra</code>, where
+<code><em>release</em></code> is the kernel release
+(see `uname --kernel-release`).
--- /dev/null
+---
+id: lttng-relayd
+---
+
+When a tracing session is configured to send its trace data over the
+network, an LTTng _relay daemon_ must be used at the other end to
+receive trace packets and serialize them to trace files. This setup
+makes it possible to trace a target system without ever committing trace
+data to its local storage, a feature which is useful for embedded
+systems, amongst others. The command implementing the relay daemon
+is `lttng-relayd`.
+
+The basic use case of `lttng-relayd` is to transfer trace data received
+over the network to trace files on the local file system. The relay
+daemon must listen on two TCP ports to achieve this: one control port,
+used by the target session daemon, and one data port, used by the
+target consumer daemon. The relay and session daemons agree on common
+default ports when custom ones are not specified.
+
+Since the communication transport protocol for both ports is standard
+TCP, the relay daemon may be started either remotely or locally (on the
+target system).
+
+While two instances of consumer daemons (32-bit and 64-bit) may run
+concurrently for a given user, `lttng-relayd` needs only be of its
+host operating system's bitness.
+
+The other important feature of LTTng's relay daemon is the support of
+_LTTng live_. LTTng live is an application protocol to view events as
+they arrive. The relay daemon will still record events in trace files,
+but a _tee_ may be created to inspect incoming events. Using LTTng live
+locally thus requires to run a local relay daemon.
--- /dev/null
+---
+id: lttng-sessiond
+---
+
+At the heart of LTTng's plumbing is the _session daemon_, often called
+by its command name, `lttng-sessiond`.
+
+The session daemon is responsible for managing tracing sessions and
+what they logically contain (channel properties, enabled/disabled
+events, etc.). By communicating locally with instrumented applications
+(using LTTng-UST) and with the LTTng Linux kernel modules
+(LTTng-modules), it oversees all tracing activities.
+
+One of the many things that `lttng-sessiond` does is to keep
+track of the available event types. User space applications and
+libraries actively connect and register to the session daemon when they
+start. By contrast, `lttng-sessiond` seeks out and loads the appropriate
+LTTng kernel modules as part of its own initialization. Kernel event
+types are _pulled_ by `lttng-sessiond`, whereas user space event types
+are _pushed_ to it by the various user space tracepoint providers.
+
+Using a specific inter-process communication protocol with Linux kernel
+and user space tracers, the session daemon can send channel information
+so that they are initialized, enable/disable specific probes based on
+enabled/disabled events by the user, send event filters information to
+LTTng tracers so that filtering actually happens at the tracer site,
+start/stop tracing a specific application or the Linux kernel, etc.
+
+The session daemon is not useful without some user controlling it,
+because it's only a sophisticated control interchange and thus
+doesn't make any decision on its own. `lttng-sessiond` opens a local
+socket for controlling it, albeit the preferred way to control it is
+using `liblttng-ctl`, an installed C library hiding the communication
+protocol behind an easy-to-use API. The `lttng` tool makes use of
+`liblttng-ctl` to implement a user-friendly command line interface.
+
+`lttng-sessiond` does not receive any trace data from instrumented
+applications; the _consumer daemons_ are the programs responsible for
+collecting trace data using shared ring buffers. However, the session
+daemon is the one that must spawn a consumer daemon and establish
+a control communication with it.
+
+Session daemons run on a per-user basis. Knowing this, multiple
+instances of `lttng-sessiond` may run simultaneously, each belonging
+to a different user and each operating independently of the others.
+Only `root`'s session daemon, however, may control LTTng kernel modules
+(i.e. the kernel tracer). With that in mind, if a user has no root
+access on the target system, he cannot trace the system's kernel, but
+should still be able to trace its own instrumented applications.
+
+It has to be noted that, although only `root`'s session daemon may
+control the kernel tracer, the `lttng-sessiond` command has a `--group`
+option which may be used to specify the name of a special user group
+allowed to communicate with `root`'s session daemon and thus record
+kernel traces. By default, this group is named `tracing`.
+
+If not done yet, the `lttng` tool, by default, automatically starts a
+session daemon. `lttng-sessiond` may also be started manually:
+
+<pre class="term">
+lttng-sessiond
+</pre>
+
+This will start the session daemon in foreground. Use
+
+<pre class="term">
+lttng-sessiond --daemonize
+</pre>
+
+to start it as a true daemon.
+
+To kill the current user's session daemon, `pkill` may be used:
+
+<pre class="term">
+pkill lttng-sessiond
+</pre>
+
+The default `SIGTERM` signal will terminate it cleanly.
+
+Several other options are available and described in
+<a href="/man/8/lttng-sessiond" class="ext"><code>lttng-sessiond</code>'s manpage</a>
+or by running `lttng-sessiond --help`.
--- /dev/null
+---
+id: lttng-ust
+---
+
+The user space tracing part of LTTng is possible thanks to the user
+space tracing library, `liblttng-ust`, which is part of the LTTng-UST
+package.
+
+`liblttng-ust` provides header files containing macros used to define
+tracepoints and create tracepoint providers, as well as a shared object
+that must be linked to individual applications to connect to and
+communicate with a session daemon and a consumer daemon as soon as the
+application starts.
+
+The exact mechanism by which an application is registered to the
+session daemon is beyond the scope of this documentation. The only thing
+you need to know is that, since the library constructor does this job
+automatically, tracepoints may be safely inserted anywhere in the source
+code without prior manual initialization of `liblttng-ust`.
+
+The `liblttng-ust`-session daemon collaboration also provides an
+interesting feature: user space events may be enabled _before_
+applications actually start. By doing this and starting tracing before
+launching the instrumented application, you make sure that even the
+earliest occurring events can be recorded.
+
+The [C application](#doc-c-application) instrumenting guide of the
+[Using LTTng](#doc-using-lttng) chapter focuses on using `liblttng-ust`:
+instrumenting, building/linking and running a user application.
--- /dev/null
+---
+id: plumbing-overview
+---
+
+As [mentioned previously](#doc-installing-lttng), the whole LTTng suite
+is made of the following packages: LTTng-tools, LTTng-UST, and
+LTTng-modules. Together, they provide different daemons, libraries,
+kernel modules and command line interfaces. The following tree shows
+which usable component belongs to which package:
+
+ * **LTTng-tools**:
+ * session daemon (`lttng-sessiond`)
+ * consumer daemon (`lttng-consumerd`)
+ * relay daemon (`lttng-relayd`)
+ * tracing control library (`liblttng-ctl`)
+ * tracing control command line tool (`lttng`)
+ * **LTTng-UST**:
+ * user space tracing library (`liblttng-ust`) and its headers
+ * preloadable user space tracing helpers
+ (`liblttng-ust-libc-wrapper`, `liblttng-ust-pthread-wrapper`,
+ `liblttng-ust-cyg-profile`, `liblttng-ust-cyg-profile-fast`
+ and `liblttng-ust-dl`)
+ * user space tracepoint code generator command line tool
+ (`lttng-gen-tp`)
+ * Java Util Logging tracepoint provider (`liblttng-ust-jul-jni`)
+ and JAR file (`liblttng-ust-jul.jar`)
+ * **LTTng-modules**:
+ * LTTng Linux kernel tracer module
+ * tracing ring buffer kernel modules
+ * many LTTng probe kernel modules
+
+The following diagram shows how the most important LTTng components
+interact. Plain black arrows represent trace data paths while dashed
+red arrows indicate control communications. The LTTng relay daemon is
+shown running on a remote system, although it could as well run on the
+target (monitored) system.
+
+<div class="img img-90">
+ <object data="/images/docs/plumbing.svg" type="image/svg+xml">
+ <img src="/images/docs/plumbing.svg">
+ </object>
+</div>
+
+Each component is described in the following subsections.
--- /dev/null
+---
+id: adding-context
+---
+
+If you read all the sections of
+[Controlling tracing](#doc-controlling-tracing) so far, you should be
+able to create tracing sessions, create and enable channels and events
+within them and start/stop the LTTng tracers. Event fields recorded in
+trace files provide important information about occurring events, but
+sometimes external context may help you solve a problem faster. This
+section discusses how to add context information to events of a
+specific channel using the `lttng` tool.
+
+There are various available context values which can accompany events
+recorded by LTTng, for example:
+
+ * **process information**:
+ * identifier (PID)
+ * name
+ * priority
+ * scheduling priority (niceness)
+ * thread identifier (TID)
+ * the **hostname** of the system on which the event occurred
+ * plenty of **performance counters** using perf:
+ * CPU cycles, stalled cycles, idle cycles, etc.
+ * cache misses
+ * branch instructions, misses, loads, etc.
+ * CPU faults
+ * etc.
+
+The full list is available in the output of `lttng add-context --help`.
+Some of them are reserved for a specific domain (kernel or
+user space) while others are available for both.
+
+To add context information to one or all channels of a given tracing
+session, use the `add-context` command:
+
+<pre class="term">
+lttng add-context --userspace --type vpid --type perf:thread:cpu-cycles
+</pre>
+
+The above example adds the virtual process identifier and per-thread
+CPU cycles count values to all recorded user space domain events of the
+current tracing session. Use the `--channel` option to select a specific
+channel:
+
+<pre class="term">
+lttng add-context --kernel --channel my-channel --type tid
+</pre>
+
+adds the thread identifier value to all recorded kernel domain events
+in the channel `my-channel` of the current tracing session.
+
+Beware that context information cannot be removed from channels once
+it's added for a given tracing session.
--- /dev/null
+---
+id: basic-tracing-session-control
+---
+
+Once you have
+[created a tracing session](#doc-creating-destroying-tracing-sessions)
+and [enabled one or more events](#doc-enabling-disabling-events),
+you may activate the LTTng tracers for the current tracing session at
+any time:
+
+<pre class="term">
+lttng start
+</pre>
+
+Subsequently, you may stop the tracers:
+
+<pre class="term">
+lttng stop
+</pre>
+
+LTTng is very flexible: user space applications may be launched before
+or after the tracers are started. Events will only be recorded if they
+are properly enabled and if they occur while tracers are started.
+
+A tracing session name may be passed to both the `start` and `stop`
+commands to start/stop tracing a session other than the current one.
--- /dev/null
+---
+id: creating-destroying-tracing-sessions
+---
+
+Whatever you want to do with `lttng`, it has to happen inside a
+**tracing session**, created beforehand. A session, in general, is a
+per-user container of state. A tracing session is no different; it
+keeps a specific state of stuff like:
+
+ * session name
+ * enabled/disabled channels with associated parameters
+ * enabled/disabled events with associated log levels and filters
+ * context information added to channels
+ * tracing activity (started or stopped)
+
+and more.
+
+A single user may have many active tracing sessions. LTTng session
+daemons are the ultimate owners and managers of tracing sessions. For
+user space tracing, each user has its own session daemon. Since Linux
+kernel tracing requires root privileges, only `root`'s session daemon
+may enable and trace kernel events. However, `lttng` has a `--group`
+option (which is passed to `lttng-sessiond` when starting it) to
+specify the name of a _tracing group_ which selected users may be part
+of to be allowed to communicate with `root`'s session daemon. By
+default, the tracing group name is `tracing`.
+
+To create a tracing session, do:
+
+<pre class="term">
+lttng create my-session
+</pre>
+
+This will create a new tracing session named `my-session` and make it
+the current one. If you don't specify any name (calling only
+`lttng create`), your tracing session will be named `auto`. Traces
+are written in <code>~/lttng-traces/<em>session</em>-</code> followed
+by the tracing session's creation date/time by default, where
+<code><em>session</em></code> is the tracing session name. To save them
+at a different location, use the `--output` option:
+
+<pre class="term">
+lttng create --output /tmp/some-directory my-session
+</pre>
+
+You may create as many tracing sessions as you wish:
+
+<pre class="term">
+lttng create other-session
+lttng create yet-another-session
+</pre>
+
+You may view all existing tracing sessions using the `list` command:
+
+<pre class="term">
+lttng list
+</pre>
+
+The state of a _current tracing session_ is kept in `~/.lttngrc`. Each
+invocation of `lttng` reads this file to set its current tracing
+session name so that you don't have to specify a session name for each
+command. You could edit this file manually, but the preferred way to
+set the current tracing session is to use the `set-session` command:
+
+<pre class="term">
+lttng set-session other-session
+</pre>
+
+Most `lttng` commands accept a `--session` option to specify the name
+of the target tracing session.
+
+Any existing tracing session may be destroyed using the `destroy`
+command:
+
+<pre class="term">
+lttng destroy my-session
+</pre>
+
+Providing no argument to `lttng destroy` will destroy the current
+tracing session. Destroying a tracing session will stop any tracing
+running within the latter. Destroying a tracing session frees resources
+acquired by the session daemon and tracer side, making sure to flush
+all trace data.
+
+You can't do much with LTTng using only the `create`, `set-session`
+and `destroy` commands of `lttng`, but it is essential to know them in
+order to control LTTng tracing, which always happen within the scope of
+a tracing session.
--- /dev/null
+---
+id: fine-tuning-channels
+---
+
+There are various parameters that may be fine-tuned with the
+`enable-channel` command. The latter are well documented in
+<a href="/man/1/lttng" class="ext">the manpage of `lttng`</a>
+and in the [Channel](#doc-channel) section of the
+[Understanding LTTng](#doc-understanding-lttng) chapter. For basic
+tracing needs, their default values should be just fine, but here are a
+few examples to break the ice.
+
+As the frequency of recorded events increases—either because the
+event throughput is actually higher or because you enabled more events
+than usual—_event loss_ might be experienced. Since LTTng never
+waits, by design, for sub-buffer space availability (non-blocking
+tracer), when a sub-buffer is full and no empty sub-buffers are left,
+there are two possible outcomes: either the new events that do not fit
+are rejected, or they start replacing the oldest recorded events.
+The choice of which algorithm to use is a per-channel parameter, the
+default being discarding the newest events until there is some space
+left. If your situation always needs the latest events at the expense
+of writing over the oldest ones, create a channel with the `--overwrite`
+option:
+
+<pre class="term">
+lttng enable-channel --kernel --overwrite my-channel
+</pre>
+
+When an event is lost, it means no space was available in any
+sub-buffer to accommodate it. Thus, if you want to cope with sporadic
+high event throughput situations and avoid losing events, you need to
+allocate more room for storing them in memory. This can be done by
+either increasing the size of sub-buffers or by adding sub-buffers.
+The following example creates a user space domain channel with
+16 sub-buffers of 512 kiB each:
+
+<pre class="term">
+lttng enable-channel --userspace --num-subbuf 16 --subbuf-size 512k big-channel
+</pre>
+
+Both values need to be powers of two, otherwise they are rounded up
+to the next one.
+
+Two other interesting available parameters of `enable-channel` are
+`--tracefile-size` and `--tracefile-count`, which respectively limit
+the size of each trace file and the their count for a given channel.
+When the number of written trace files reaches its limit for a given
+channel-CPU pair, the next trace file will overwrite the very first
+one. The following example creates a kernel domain channel with a
+maximum of three trace files of 1 MiB each:
+
+<pre class="term">
+lttng enable-channel --kernel --tracefile-size 1M --tracefile-count 3 my-channel
+</pre>
+
+An efficient way to make sure lots of events are generated is enabling
+all kernel events in this channel and starting the tracer:
+
+<pre class="term">
+lttng enable-event --kernel --all --channel my-channel
+lttng start
+</pre>
+
+After a few seconds, look at trace files in your tracing session
+output directory. For two CPUs, it should look like:
+
+~~~ text
+my-channel_0_0 my-channel_1_0
+my-channel_0_1 my-channel_1_1
+my-channel_0_2 my-channel_1_2
+~~~
+
+Amongst the files above, you might see one in each group with a size
+lower than 1 MiB: they are the files currently being written.
+
+Since all those small files are valid LTTng trace files, LTTng trace
+viewers may read them. It is the viewer's responsibility to properly
+merge the streams so as to present an ordered list to the user.
+<a href="http://www.efficios.com/babeltrace" class="ext">Babeltrace</a>
+merges LTTng trace files correctly and is fast at doing it.
--- /dev/null
+---
+id: enabling-disabling-channels
+---
+
+[As mentioned](#doc-event) in the
+[Understanding LTTng](#doc-understanding-lttng) chapter, enabled
+events are contained in a specific channel, itself contained in a
+specific tracing session. A channel is a group of events with
+tunable parameters (event loss mode, sub-buffer size, number of
+sub-buffers, trace file sizes and count, etc.). A given channel may
+only be responsible for enabled events belonging to one domain: either
+kernel or user space.
+
+If you only used the `create`, `enable-event` and `start`/`stop`
+commands of the `lttng` tool so far, one or two channels were
+automatically created for you (one for the kernel domain and/or one
+for the user space domain). The default channels are both named
+`channel0`; channels from different domains may have the same name.
+
+The current channels of a given tracing session can be viewed with
+
+<pre class="term">
+lttng list some-session
+</pre>
+
+where `some-session` is the name of the desired tracing session.
+
+To create and enable a channel, use the `enable-channel` command:
+
+<pre class="term">
+lttng enable-channel --kernel my-channel
+</pre>
+
+This will create a kernel domain channel named `my-channel` with
+default parameters in the current tracing session.
+
+<div class="tip">
+<p>
+ <span class="t">Note:</span>Because of a current limitation, all
+ channels must be <em>created</em> prior to beginning tracing in a
+ given tracing session, i.e. before the first time you do
+ <code>lttng start</code>.
+</p>
+<p>
+ Since a channel is automatically created by
+ <code>enable-event</code> only for the specified domain, you cannot,
+ for example, enable a kernel domain event, start tracing and then
+ enable a user space domain event because no user space channel
+ exists yet and it's too late to create one.
+</p>
+<p>
+ For this reason, make sure to configure your channels properly
+ before starting the tracers for the first time!
+</p>
+</div>
+
+Here's another example:
+
+<pre class="term">
+lttng enable-channel --userspace --session other-session --overwrite \
+ --tracefile-size 1048576 1mib-channel
+</pre>
+
+This will create a user space domain channel named `1mib-channel` in
+the tracing session named `other-session` that loses new events by
+overwriting previously recorded events (instead of the default mode of
+discarding newer ones) and saves trace files with a maximum size of
+1 MiB each.
+
+Note that channels may also be created using the `--channel` option of
+the `enable-event` command when the provided channel name doesn't exist
+for the specified domain:
+
+<pre class="term">
+lttng enable-event --kernel --channel some-channel sched_switch
+</pre>
+
+If no kernel domain channel named `some-channel` existed before calling
+the above command, it would be created with default parameters.
+
+You may enable the same event in two different channels:
+
+<pre class="term">
+lttng enable-event --userspace --channel my-channel app:tp
+lttng enable-event --userspace --channel other-channel app:tp
+</pre>
+
+If both channels are enabled, the occurring `app:tp` event will
+generate two recorded events, one for each channel.
+
+Disabling a channel is done with the `disable-event` command:
+
+<pre class="term">
+lttng disable-event --kernel some-channel
+</pre>
+
+The state of a channel precedes the individual states of events within
+it: events belonging to a disabled channel, even if they are
+enabled, won't be recorded.
+
--- /dev/null
+---
+id: enabling-disabling-events
+---
+
+Inside a tracing session, individual events may be enabled or disabled
+so that tracing them may or may not generate trace data.
+
+We sometimes use the term _event_ metonymically throughout this text to
+refer to a specific condition, or _rule_, that could lead, when
+satisfied, to an actual occurring event (a point at a specific position
+in source code/binary program, logical processor and time capturing
+some payload) being recorded as trace data. This specific condition is
+composed of:
+
+ 1. A **domain** (kernel, user space or Java Util Logging) (required).
+ 2. One or many **instrumentation points** in source code or binary
+ program (tracepoint name, address, symbol name, function name,
+ logger name, etc.) to be executed (required).
+ 3. A **log level** (each instrumentation point declares its own log
+ level) or log level range to match (optional; only valid for user
+ space domain).
+ 4. A **custom user expression**, or **filter**, that must evaluate to
+ _true_ when a tracepoint is executed (optional; only valid for user
+ space domain).
+
+All conditions are specified using arguments passed to the
+`enable-event` command of the `lttng` tool.
+
+Condition 1 is specified using either `--kernel/-k` (kernel),
+`--userspace/-u` (user space) or `--jul/-j`
+(<abbr title="Java Util Logging">JUL</abbr>). Exactly one of those
+three arguments must be specified.
+
+Condition 2 is specified using one of:
+
+ * `--tracepoint`: **tracepoint**
+ * `--probe`: **dynamic probe** (address, symbol name or combination
+ of both in binary program; only valid for kernel domain)
+ * `--function`: **function entry/exit** (address, symbol name or
+ combination of both in binary program; only valid for kernel domain)
+ * `--syscall`: **system call entry/exit** (only valid for kernel
+ domain)
+
+When none of the above is specified, `enable-event` defaults to
+using `--tracepoint`.
+
+Condition 3 is specified using one of:
+
+ * `--loglevel`: log level range from 0 to a specific log level
+ * `--loglevel-only`: specific log level
+
+See `lttng enable-event --help` for the complete list of log level
+names.
+
+Condition 4 is specified using the `--filter` option. This filter is
+a C-like expression, potentially reading real-time values of event
+fields, that has to evaluate to _true_ for the condition to be satisfied.
+Event fields are read using plain identifiers while context fields
+must be prefixed with `$ctx.`. See `lttng enable-event --help` for
+all usage details.
+
+The aforementioned arguments are combined to create and enable events.
+Each unique combination of arguments leads to a different
+_enabled event_. The log level and filter arguments are optional, their
+default values being respectively all log levels and a filter which
+always returns _true_.
+
+Here are a few examples (you must
+[create a tracing session](#doc-creating-destroying-tracing-sessions)
+first):
+
+<pre class="term">
+lttng enable-event -u --tracepoint my_app:hello_world
+lttng enable-event -u --tracepoint my_app:hello_you --loglevel TRACE_WARNING
+lttng enable-event -u --tracepoint 'my_other_app:*'
+lttng enable-event -u --tracepoint my_app:foo_bar \
+ --filter 'some_field <= 23 && !other_field'
+lttng enable-event -k --tracepoint sched_switch
+lttng enable-event -k --tracepoint gpio_value
+lttng enable-event -k --function usb_probe_device usb_probe_device
+lttng enable-event -k --syscall --all
+</pre>
+
+The wildcard symbol, `*`, matches _anything_ and may only be used at
+the end of the string when specifying a _tracepoint_. Make sure to
+use it between single quotes in your favorite shell to avoid
+undesired shell expansion.
+
+You can see a list of events (enabled or disabled) using
+
+<pre class="term">
+lttng list some-session
+</pre>
+
+where `some-session` is the name of the desired tracing session.
+
+What you're actually doing when enabling events with specific conditions
+is creating a **whitelist** of traceable events for a given channel.
+Thus, the following case presents redundancy:
+
+<pre class="term">
+lttng enable-event -u --tracepoint my_app:hello_you
+lttng enable-event -u --tracepoint my_app:hello_you --loglevel TRACE_DEBUG
+</pre>
+
+The second command, matching a log level range, is useless since the first
+command enables all tracepoints matching the same name,
+`my_app:hello_you`.
+
+Disabling an event is simpler: you only need to provide the event
+name to the `disable-event` command:
+
+<pre class="term">
+lttng disable-event -u my_app:hello_you
+</pre>
+
+This name has to match a name previously given to `enable-event` (it
+has to be listed in the output of `lttng list some-session`).
+The `*` wildcard is supported, as long as you also used it in a
+previous `enable-event` invocation.
+
+Disabling an event does not add it to some blacklist: it simply removes
+it from its channel's whitelist. This is why you cannot disable an event
+which wasn't previously enabled.
+
+A disabled event will not generate any trace data, even if all its
+specified conditions are met.
+
+Events may be enabled and disabled at will, either when LTTng tracers
+are active or not. Events may be enabled before a user space application
+is even started.
--- /dev/null
+---
+id: controlling-tracing
+---
+
+Once you're in possession of a software that is properly
+[instrumented](#doc-instrumenting) for LTTng tracing, be it thanks to
+the built-in LTTng probes for the Linux kernel, a custom user
+application or a custom Linux kernel, all that is left is actually
+tracing it. As a user, you control LTTng tracing using a single command
+line interface: the `lttng` tool. This tool uses `liblttng-ctl` behind
+the scene to connect to and communicate with session daemons. LTTng
+session daemons may either be started manually (`lttng-sessiond`) or
+automatically by the `lttng` command when needed. Trace data may
+be forwarded to the network and used elsewhere using an LTTng relay
+daemon (`lttng-relayd`).
+
+The manpages of `lttng`, `lttng-sessiond` and `lttng-relayd` are pretty
+complete, thus this section is not an online copy of the latter (we
+leave this contents for the
+[Online LTTng manpages](#doc-online-lttng-manpages) section).
+This section is rather a tour of LTTng
+features through practical examples and tips.
+
+If not already done, make sure you understand the core concepts
+and how LTTng components connect together by reading the
+[Understanding LTTng](#doc-understanding-lttng) chapter; this section
+assumes you are familiar with them.
--- /dev/null
+---
+id: lttng-live
+---
+
+We have seen how trace files may be produced by LTTng out of generated
+application and Linux kernel events. We have seen that those trace files
+may be either recorded locally by consumer daemons or remotely using
+a relay daemon. And we have seen that the maximum size and count of
+trace files is configurable for each channel. With all those features,
+it's still not possible to read a trace file as it is being written
+because it could be incomplete and appear corrupted to the viewer.
+There is a way to view events as they arrive, however: using
+_LTTng live_.
+
+LTTng live is implemented, in LTTng, solely on the relay daemon side.
+As trace data is sent over the network to a relay daemon by a (possibly
+remote) consumer daemon, a _tee_ may be created: trace data will be
+recorded to trace files _as well as_ being transmitted to a
+connected live viewer:
+
+<div class="img img-90">
+ <object data="/images/docs/lttng-live-relayd.svg" type="image/svg+xml">
+ <img src="/images/docs/lttng-live-relayd.svg">
+ </object>
+</div>
+
+In order to use this feature, a tracing session must created in live
+mode on the target system:
+
+<pre class="term">
+lttng create --live
+</pre>
+
+An optional parameter may be passed to `--live` to set the interval
+of time (in microseconds) between flushes to the network
+(1 second is the default):
+
+<pre class="term">
+lttng create --live 100000
+</pre>
+
+will flush every 100 ms.
+
+If no network output is specified to the `create` command, a local
+relay daemon will be spawned. In this very common case, viewing a live
+trace is easy: enable events and start tracing as usual, then use
+`lttng view` to start the default live viewer:
+
+<pre class="term">
+lttng view
+</pre>
+
+The correct arguments will be passed to the live viewer so that it
+may connect to the local relay daemon and start reading live events.
+
+You may also wish to use a live viewer not running on the target
+system. In this case, you should specify a network output when using
+the `create` command (`--set-url` or `--ctrl-url`/`--data-url` options).
+A distant LTTng relay daemon should also be started to receive control
+and trace data. By default, `lttng-relayd` listens on 127.0.0.1:5344
+for an LTTng live connection. Otherwise, the desired URL may be
+specified using its `--live-port` option.
+
+The
+<a href="http://www.efficios.com/babeltrace" class="ext">`babeltrace`</a>
+viewer supports LTTng live as one of its input formats. `babeltrace` is
+the default viewer when using `lttng view`. To use it manually, first
+list active tracing sessions by doing the following (assuming the relay
+daemon to connect to runs on the same host):
+
+<pre class="term">
+babeltrace -i lttng-live net://localhost
+</pre>
+
+Then, choose a tracing session and start viewing events as they arrive
+using LTTng live, e.g.:
+
+<pre class="term">
+babeltrace -i lttng-live net://localhost/host/hostname/my-session
+</pre>
--- /dev/null
+---
+id: saving-loading-tracing-session
+---
+
+Configuring a tracing session may be long: creating and enabling
+channels with specific parameters, enabling kernel and user space
+domain events with specific log levels and filters, adding context
+to some channels, etc. If you're going to use LTTng to solve real
+world problems, chances are you're going to have to record events using
+the same tracing session setup over and over, modifying a few variables
+each time in your instrumented program or environment. To avoid
+constant tracing session reconfiguration, the `lttng` tool is able to
+save and load tracing session configurations to/from XML files.
+
+To save a given tracing session configuration, do:
+
+<pre class="term">
+lttng save my-session
+</pre>
+
+where `my-session` is the name of the tracing session to save. Tracing
+session configurations are saved to `~/.lttng/sessions` by default;
+use the `--output-path` option to change this destination directory.
+
+All configuration parameters are saved:
+
+ * tracing session name
+ * trace data output path
+ * channels with their state and all their parameters
+ * context information added to channels
+ * events with their state, log level and filter
+ * tracing activity (started or stopped)
+
+To load a tracing session, simply do:
+
+<pre class="term">
+lttng load my-session
+</pre>
+
+or, if you used a custom path:
+
+<pre class="term">
+lttng load --input-path /path/to/my-session.lttng
+</pre>
+
+Your saved tracing session will be restored as if you just configured
+it manually.
--- /dev/null
+---
+id: sending-trace-data-over-the-network
+---
+
+The possibility of sending trace data over the network comes as a
+built-in feature of LTTng-tools. For this to be possible, an LTTng
+_relay daemon_ must be executed and listening on the machine where
+trace data is to be received, and the user must create a tracing
+session using appropriate options to forward trace data to the remote
+relay daemon.
+
+The relay daemon listens on two different TCP ports: one for control
+information and the other for actual trace data.
+
+Starting the relay daemon on the remote machine is as easy as:
+
+<pre class="term">
+lttng-relayd
+</pre>
+
+This will make it listen to its default ports: 5342 for control and
+5343 for trace data. The `--control-port` and `--data-port` options may
+be used to specify different ports.
+
+Traces written by `lttng-relayd` are written to
+<code>~/lttng-traces/<em>hostname</em>/<em>session</em></code> by
+default, where <code><em>hostname</em></code> is the host name of the
+traced (monitored) system and <code><em>session</em></code> is the
+tracing session name. Use the `--output` option to write trace data
+outside `~/lttng-traces`.
+
+On the sending side, a tracing session must be created using the
+`lttng` tool with the `--set-url` option to connect to the distant
+relay daemon:
+
+<pre class="term">
+lttng create my-session --set-url net://distant-host
+</pre>
+
+The URL format is described in the output of `lttng create --help`.
+The above example will use the default ports; the `--ctrl-url` and
+`--data-url` options may be used to set the control and data URLs
+individually.
+
+Once this basic setup is completed and the connection is established,
+you may use the `lttng` tool on the target machine as usual; everything
+you do will be transparently forwarded to the remote machine if needed.
+For example, a parameter changing the maximum size of trace files will
+have an effect on the distant relay daemon actually writing the trace.
--- /dev/null
+---
+id: taking-a-snapshot
+---
+
+The normal behavior of LTTng is to record trace data as trace files.
+This is ideal for keeping a long history of events that occurred on
+the target system and applications, but may be too much data in some
+situations. For example, you may wish to trace your application
+continuously until some critical situation happens, in which case you
+would only need the latest few recorded events to perform the desired
+analysis, not multi-gigabyte trace files.
+
+LTTng has an interesting feature called _snapshots_. When creating
+a tracing session in snapshot mode, no trace files are written; the
+tracers' sub-buffers are constantly overwriting the oldest recorded
+events with the newest. At any time, either when the tracers are started
+or stopped, you may take a snapshot of those sub-buffers.
+
+There is no difference between the format of a normal trace file and the
+format of a snapshot: viewers of LTTng traces will also support LTTng
+snapshots. By default, snapshots are written to disk, but they may also
+be sent over the network.
+
+To create a tracing session in snapshot mode, do:
+
+<pre class="term">
+lttng create --snapshot my-snapshot-session
+</pre>
+
+Next, enable channels, events and add context to channels as usual.
+Once a tracing session is created in snapshot mode, channels will be
+forced to use the overwrite mode (`--overwrite` option of the
+`enable-channel` command) and have an `mmap()` channel type
+(`--output mmap`).
+
+Start tracing. When you're ready to take a snapshot, do:
+
+<pre class="term">
+lttng snapshot record --name my-snapshot
+</pre>
+
+This will record a snapshot named `my-snapshot` of all channels of
+all domains of the current tracing session. By default, snapshots files
+are recorded in the path returned by `lttng snapshot list-output`. You
+may change this path or decide to send snapshots over the network
+using either:
+
+ 1. an output path/URL specified when creating the tracing session
+ (`lttng create`)
+ 2. an added snapshot output path/URL using
+ `lttng snapshot add-output`
+ 3. an output path/URL provided directly to the
+ `lttng snapshot record` command
+
+Method 3 overrides method 2 which overrides method 1. When specifying
+a URL, a relay daemon must be listening on some machine (see
+[Sending trace data over the network](#doc-sending-trace-data-over-the-network)).
+
+If you need to make absolutely sure that the output file won't be
+larger than a certain limit, you can set a maximum snapshot size when
+taking it with the `--max-size` option:
+
+<pre class="term">
+lttng snapshot record --name my-snapshot --max-size 2M
+</pre>
+
+Older recorded events will be discarded in order to respect this
+maximum size.
--- /dev/null
+---
+id: building-32-bit-lttng-tools
+---
+
+Since the host is a 64-bit system, most 32-bit binaries and libraries of
+LTTng-tools are not needed; the host will use their 64-bit counterparts.
+The required step here is building and installing a 32-bit consumer
+daemon.
+
+Follow this:
+
+<pre class="term">
+git clone http://git.lttng.org/lttng-tools.git
+cd lttng-ust
+./bootstrap
+./configure --prefix=/usr \
+ --libdir=/usr/lib32 CFLAGS=-m32 CXXFLAGS=-m32 \
+ LDFLAGS=-L/usr/lib32
+make
+cd src/bin/lttng-consumerd
+sudo make install
+sudo ldconfig
+</pre>
+
+The above commands build all the LTTng-tools project as 32-bit
+applications, but only installs the 32-bit consumer daemon.
--- /dev/null
+---
+id: building-32-bit-lttng-ust
+---
+
+Follow this:
+
+<pre class="term">
+git clone http://git.lttng.org/lttng-ust.git
+cd lttng-ust
+./bootstrap
+./configure --prefix=/usr \
+ --libdir=/usr/lib32 \
+ CFLAGS=-m32 CXXFLAGS=-m32 \
+ LDFLAGS=-L/usr/lib32
+make
+sudo make install
+sudo ldconfig
+</pre>
+
+`-L/usr/lib32` is required for the build to find the 32-bit version
+of Userspace RCU.
+
+<div class="tip">
+<p>
+ <span class="t">Note:</span>You may add options to
+ <code>./configure</code> if you need them, e.g., for
+ Java and SystemTap support. Look at
+ <code>./configure --help</code> for more information.
+</p>
+</div>
--- /dev/null
+---
+id: building-32-bit-userspace-rcu
+---
+
+Follow this:
+
+<pre class="term">
+git clone git://git.urcu.so/urcu.git
+cd urcu
+./bootstrap
+./configure --libdir=/usr/lib32 CFLAGS=-m32
+make
+sudo make install
+sudo ldconfig
+</pre>
+
+The `-m32` C compiler flag creates 32-bit object files and `--libdir`
+indicates where to install the resulting libraries.
--- /dev/null
+---
+id: building-64-bit-lttng-tools
+---
+
+Finally, you need to build a 64-bit version of LTTng-tools which is
+aware of the 32-bit consumer daemon previously built and installed:
+
+<pre class="term">
+make clean
+./bootstrap
+./configure --prefix=/usr \
+ --with-consumerd32-libdir=/usr/lib32 \
+ --with-consumerd32-bin=/usr/lib32/lttng/libexec/lttng-consumerd
+make
+sudo make install
+sudo ldconfig
+</pre>
+
+Henceforth, the 64-bit session daemon will automatically find the
+32-bit consumer daemon if required.
--- /dev/null
+---
+id: building-instrumented-32-bit-c-application
+---
+
+Let us reuse the _Hello world_ example of
+[Tracing your own user application](#doc-tracing-your-own-user-application)
+([Getting started](#doc-getting-started) chapter).
+
+The instrumentation process is unaltered.
+
+First, a typical 64-bit build (assuming you're running a 64-bit system):
+
+<pre class="term">
+gcc -o hello64 -I. hello.c hello-tp.c -ldl -llttng-ust
+</pre>
+
+Now, a 32-bit build:
+
+<pre class="term">
+gcc -o hello32 -I. <strong>-m32</strong> hello.c hello-tp.c <strong>-L/usr/lib32</strong> \
+ -ldl -llttng-ust <strong>-Wl,-rpath,/usr/lib32</strong>
+</pre>
+
+The `-rpath` option, passed to the linker, will make the dynamic loader
+check for libraries in `/usr/lib32` before looking in its default paths,
+where it should find the 32-bit version of `liblttng-ust`.
--- /dev/null
+---
+id: instrumenting-32-bit-app-on-64-bit-system
+---
+
+In order to trace a 32-bit application running on a 64-bit system,
+LTTng must use a dedicated 32-bit
+[consumer daemon](#doc-lttng-consumerd). This section discusses how to
+build that daemon (which is _not_ part of the default 64-bit LTTng
+build) and the LTTng 32-bit tracing libraries, and how to instrument
+a 32-bit application in that context.
+
+Make sure you install all 32-bit versions of LTTng dependencies.
+Their names can be found in the `README.md` files of each LTTng package
+source. How to find and install them will vary depending on your target
+Linux distribution. `gcc-multilib` is a common package name for the
+multilib version of GCC, which you will also need.
+
+The following packages will be built for 32-bit support on a 64-bit
+system: <a href="http://urcu.so/" class="ext">Userspace RCU</a>,
+LTTng-UST and LTTng-tools.
--- /dev/null
+---
+id: running-32-bit-and-64-bit-c-applications
+---
+
+Now, both 32-bit and 64-bit versions of the _Hello world_ example above
+can be traced in the same tracing session. Use the `lttng` tool as usual
+to create a tracing session and start tracing:
+
+<pre class="term">
+lttng create session-3264
+lttng enable-event -u -a
+./hello32
+./hello64
+lttng stop
+</pre>
+
+Use `lttng view` to verify both processes were
+successfully traced.
--- /dev/null
+---
+id: advanced-instrumenting-techniques
+---
+
+This section presents some advanced techniques related to
+LTTng instrumenting.
--- /dev/null
+---
+id: assigning-log-levels
+---
+
+Optionally, a log level can be assigned to a defined tracepoint.
+Assigning different levels of importance to tracepoints can be useful;
+when controlling tracing sessions,
+[you can choose](#doc-controlling-tracing) to only enable tracepoints
+falling into a specific log level range.
+
+Log levels are assigned to defined tracepoints using the
+`TRACEPOINT_LOGLEVEL()` macro. The latter must be used _after_ having
+used `TRACEPOINT_EVENT()` for a given tracepoint. The
+`TRACEPOINT_LOGLEVEL()` macro has the following construct:
+
+~~~ c
+TRACEPOINT_LOGLEVEL(<provider name>, <tracepoint name>, <log level>)
+~~~
+
+where the first two arguments are the same as the first two arguments
+of `TRACEPOINT_EVENT()` and `<log level>` is one
+of the values given in the
+[LTTng-UST library reference](#doc-liblttng-ust-tracepoint-loglevel)
+section.
+
+As an example, let's assign a `TRACE_DEBUG_UNIT` log level to our
+previous tracepoint definition:
+
+~~~ c
+TRACEPOINT_LOGLEVEL(my_provider, my_tracepoint, TRACE_DEBUG_UNIT)
+~~~
--- /dev/null
+---
+id: dynamic-linking
+---
+
+The second approach to package the tracepoint providers is to use
+dynamic linking: the library and its member functions are explicitly
+sought, loaded and unloaded at runtime using `libdl`.
+
+It has to be noted that, for a variety of reasons, the created shared
+library will be dynamically _loaded_, as opposed to dynamically
+_linked_. The tracepoint provider shared object is, however, linked
+with `liblttng-ust`, so that `liblttng-ust` is guaranteed to be loaded
+as soon as the tracepoint provider is. If the tracepoint provider is
+not loaded, since the application itself is not linked with
+`liblttng-ust`, the latter is not loaded at all and the tracepoint calls
+become inert.
+
+The process to create the tracepoint provider shared object is pretty
+much the same as the static library method, except that:
+
+ * since the tracepoint provider is not part of the application
+ anymore, `TRACEPOINT_DEFINE` _must_ be defined in one translation
+ unit (C source file) of the _application_;
+ * `TRACEPOINT_PROBE_DYNAMIC_LINKAGE` must be defined next to
+ `TRACEPOINT_DEFINE`.
+
+`TRACEPOINT_PROBE_DYNAMIC_LINKAGE` makes the macros included afterwards
+(by including the tracepoint provider header, which itself includes
+LTTng-UST headers) aware that the tracepoint provider is to be loaded
+dynamically and not part of the application's executable.
+
+The tracepoint provider object file used to create the shared library
+is built like it is using the static library method, only with the
+`-fpic` option added:
+
+<pre class="term">
+gcc -c <strong>-fpic</strong> -I. tp.c
+</pre>
+
+It is then linked as a shared library like this:
+
+<pre class="term">
+gcc <strong>-shared -Wl,--no-as-needed -o tp.so -llttng-ust</strong> tp.o
+</pre>
+
+As previously stated, this tracepoint provider shared object isn't
+linked with the user application: it will be loaded manually. This is
+why the application is built with no mention of this tracepoint
+provider, but still needs `libdl`:
+
+<pre class="term">
+gcc -o app other.o files.o of.o your.o app.o <strong>-ldl</strong>
+</pre>
+
+Now, to make LTTng-UST tracing available to the application,
+the `LD_PRELOAD` environment variable is used to preload the
+tracepoint provider shared library _before_ the application actually
+starts:
+
+<pre class="term">
+<strong>LD_PRELOAD=/path/to/tp.so</strong> ./app
+</pre>
+
+You application will still work without this preloading, albeit without
+LTTng-UST tracing support:
+
+<pre class="term">
+./app
+</pre>
--- /dev/null
+---
+id: building-tracepoint-providers-and-user-application
+---
+
+This section explains the final step of using LTTng-UST for tracing
+a user space C application (beside running the application): building and
+linking tracepoint providers and the application itself.
+
+As discussed above, the macros used by the user-written tracepoint provider
+header file are useless until actually used to create probes code
+(global data structures and functions) in a translation unit (C source file).
+This is accomplished by defining `TRACEPOINT_CREATE_PROBES` in a translation
+unit and then including the tracepoint provider header file.
+When `TRACEPOINT_CREATE_PROBES` is defined, macros used and included by
+the tracepoint provider header will output actual source code needed by any
+application using the defined tracepoints. Defining
+`TRACEPOINT_CREATE_PROBES` produces code used when registering
+tracepoint providers when the tracepoint provider package loads.
+
+The other important definition is `TRACEPOINT_DEFINE`. This one creates
+global, per-tracepoint structures referencing the tracepoint providers
+data. Those structures are required by the actual functions inserted
+where `tracepoint()` macros are placed and need to be defined by the
+instrumented application.
+
+Both `TRACEPOINT_CREATE_PROBES` and `TRACEPOINT_DEFINE` need to be defined
+at some places in order to trace a user space C application using LTTng.
+Although explaining their exact mechanism is beyond the scope of this
+document, the reason they both exist separately is to allow the trace
+providers to be packaged as a shared object (dynamically loaded library).
+
+There are two ways to compile and link the tracepoint providers
+with the application: _[statically](#doc-static-linking)_ or
+_[dynamically](#doc-dynamic-linking)_. Both methods are covered in the
+following subsections.
--- /dev/null
+---
+id: lttng-ust-pkg-config
+---
+
+On some distributions, LTTng-UST is shipped with a pkg-config metadata
+file, so that you may use the `pkg-config` tool:
+
+<pre class="term">
+pkg-config --libs lttng-ust
+</pre>
+
+This will return `-llttng-ust -ldl` on Linux systems.
+
+You may also check the LTTng-UST version using `pkg-config`:
+
+<pre class="term">
+pkg-config --modversion lttng-ust
+</pre>
+
+For more information about pkg-config, see
+<a href="http://linux.die.net/man/1/pkg-config" class="ext">its manpage</a>.
--- /dev/null
+---
+id: static-linking
+---
+
+With the static linking method, compiled tracepoint providers are copied
+into the target application. There are three ways to do this:
+
+ 1. Use one of your **existing C source files** to create probes.
+ 2. Create probes in a separate C source file and build it as an
+ **object file** to be linked with the application (more decoupled).
+ 3. Create probes in a separate C source file, build it as an
+ object file and archive it to create a **static library**
+ (more decoupled, more portable).
+
+The first approach is to define `TRACEPOINT_CREATE_PROBES` and include
+your tracepoint provider(s) header file(s) directly into an existing C
+source file. Here's an example:
+
+~~~ c
+#include <stdlib.h>
+#include <stdio.h>
+/* ... */
+
+#define TRACEPOINT_CREATE_PROBES
+#define TRACEPOINT_DEFINE
+#include "tp.h"
+
+/* ... */
+
+int my_func(int a, const char* b)
+{
+ /* ... */
+
+ tracepoint(my_provider, my_tracepoint, buf, sz, limit, &tt)
+
+ /* ... */
+}
+
+/* ... */
+~~~
+
+Again, `TRACEPOINT_CREATE_PROBES` and `TRACEPOINT_DEFINE` must be
+defined in one, **and only one**, translation unit. Other C source
+files of the same application may include `tp.h` to use tracepoints
+with `tracepoint()`, but must not define
+`TRACEPOINT_CREATE_PROBES`/`TRACEPOINT_DEFINE` again.
+
+This translation unit may be built as an object file by making sure to
+add `.` to the include path:
+
+<pre class="term">
+gcc -c <strong>-I.</strong> file.c
+</pre>
+
+The second approach is to isolate the tracepoint provider code into a
+separate object file by using a dedicated C source file to create probes:
+
+~~~ c
+#define TRACEPOINT_CREATE_PROBES
+
+#include "tp.h"
+~~~
+
+`TRACEPOINT_DEFINE` must be defined by a translation unit of the
+application. Since we're talking about static linking here, it could as
+well be defined in the file above, before `#include "tp.h"`. This is
+actually what [`lttng-gen-tp`](#doc-lttng-gen-tp) does.
+
+Build the tracepoint provider:
+
+<pre class="term">
+gcc -c -I. tp.c
+</pre>
+
+Finally, the resulting object file may be archived to create a
+more portable tracepoint provider static library:
+
+<pre class="term">
+ar rc tp.a tp.o
+</pre>
+
+Using a static library does have the advantage of centralising the
+tracepoint providers objects so they can be shared between multiple
+applications. This way, when the tracepoint provider is modified, the
+source code changes don't have to be patched into each application's source
+code tree. The applications need to be relinked after each change, but need
+not to be otherwise recompiled (unless the tracepoint provider's API
+changes).
+
+Regardless of which method you choose, you end up with an object file
+(potentially archived) containing the trace providers assembled code.
+To link this code with the rest of your application, you must also link
+with `liblttng-ust` and `libdl`:
+
+<pre class="term">
+gcc -o app <strong>tp.o</strong> other.o files.o of.o your.o app.o <strong>-llttng-ust -ldl</strong>
+</pre>
+
+or
+
+<pre class="term">
+gcc -o app <strong>tp.a</strong> other.o files.o of.o your.o app.o -llttng-ust -ldl
+</pre>
+
+If you're using a <abbr title="Berkeley Software Distribution">BSD</abbr>
+system, replace `-ldl` with `-lc`:
+
+<pre class="term">
+gcc -o app tp.a other.o files.o of.o your.o app.o -llttng-ust <strong>-lc</strong>
+</pre>
+
+The application can be started as usual, e.g.:
+
+<pre class="term">
+./app
+</pre>
+
+The `lttng` command line tool can be used to
+[control tracing](#doc-controlling-tracing).
--- /dev/null
+---
+id: using-lttng-ust-with-daemons
+---
+
+Some extra care is needed when using `liblttng-ust` with daemon
+applications that call `fork()`, `clone()` or BSD's `rfork()` without
+a following `exec()` family system call. The `liblttng-ust-fork`
+library must be preloaded for the application.
+
+Example:
+
+<pre class="term">
+<strong>LD_PRELOAD=liblttng-ust-fork.so</strong> ./app
+</pre>
+
+Or, if you're using a tracepoint provider shared library:
+
+<pre class="term">
+<strong>LD_PRELOAD="liblttng-ust-fork.so /path/to/tp.so"</strong> ./app
+</pre>
--- /dev/null
+---
+id: defining-tracepoints
+---
+
+As written in [Tracepoint provider](#doc-tracepoint-provider),
+tracepoints are defined using the
+`TRACEPOINT_EVENT()` macro. Each tracepoint, when called using the
+`tracepoint()` macro in the actual application's source code, generates
+a specific event type with its own fields.
+
+Let's have another look at the example above, with a few added comments:
+
+~~~ c
+TRACEPOINT_EVENT(
+ /* tracepoint provider name */
+ my_provider,
+
+ /* tracepoint/event name */
+ my_first_tracepoint,
+
+ /* list of tracepoint arguments */
+ TP_ARGS(
+ int, my_integer_arg,
+ char*, my_string_arg
+ ),
+
+ /* list of fields of eventual event */
+ TP_FIELDS(
+ ctf_string(my_string_field, my_string_arg)
+ ctf_integer(int, my_integer_field, my_integer_arg)
+ )
+)
+~~~
+
+The tracepoint provider name must match the name of the tracepoint
+provider in which this tracepoint is defined
+(see [Tracepoint provider](#doc-tracepoint-provider)). In other words,
+always use the same string as the value of `TRACEPOINT_PROVIDER` above.
+
+The tracepoint name will become the event name once events are recorded
+by the LTTng-UST tracer. It must follow the tracepoint provider name
+syntax: start with a letter and contain either letters, numbers or
+underscores. Two tracepoints under the same provider cannot have the
+same name, i.e. you cannot overload a tracepoint like you would
+overload functions and methods in C++/Java.
+
+<div class="tip">
+<p><span class="t">Note:</span>The concatenation of the tracepoint
+provider name and the tracepoint name cannot exceed 254 characters. If
+it does, the instrumented application will compile and run, but LTTng
+will issue multiple warnings and you could experience serious problems.</p>
+</div>
+
+The list of tracepoint arguments gives this tracepoint its signature:
+see it like the declaration of a C function. The format of `TP_ARGS()`
+arguments is: C type, then argument name; repeat as needed, up to ten
+times. For example, if we were to replicate the signature of C standard
+library's `fseek()`, the `TP_ARGS()` part would look like:
+
+~~~ c
+ TP_ARGS(
+ FILE*, stream,
+ long int, offset,
+ int, origin
+ ),
+~~~
+
+Of course, you will need to include appropriate header files before
+the `TRACEPOINT_EVENT()` macro calls if any argument has a complex type.
+
+`TP_ARGS()` may not be omitted, but may be empty. `TP_ARGS(void)` is
+also accepted.
+
+The list of fields is where the fun really begins. The fields defined
+in this list will be the fields of the events generated by the execution
+of this tracepoint. Each tracepoint field definition has a C
+_argument expression_ which will be evaluated when the execution reaches
+the tracepoint. Tracepoint arguments _may be_ used freely in those
+argument expressions, but they _don't_ have to.
+
+There are several types of tracepoint fields available. The macros to
+define them are given and explained in the
+[LTTng-UST library reference](#doc-liblttng-ust-tp-fields) section.
+
+Field names must follow the standard C identifier syntax: letter, then
+optional sequence of letters, numbers or underscores. Each field must have
+a different name.
+
+Those `ctf_*()` macros are added to the `TP_FIELDS()` part of
+`TRACEPOINT_EVENT()`. Note that they are not delimited by commas.
+`TP_FIELDS()` may be empty, but the `TP_FIELDS(void)` form is _not_
+accepted.
+
+The following snippet shows how argument expressions may be used in
+tracepoint fields and how they may refer freely to tracepoint arguments.
+
+~~~ c
+/* for struct stat */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+TRACEPOINT_EVENT(
+ my_provider,
+ my_tracepoint,
+ TP_ARGS(
+ int, my_int_arg,
+ char*, my_str_arg,
+ struct stat*, st
+ ),
+ TP_FIELDS(
+ /* simple integer field with constant value */
+ ctf_integer(
+ int, /* field C type */
+ my_constant_field, /* field name */
+ 23 + 17 /* argument expression */
+ )
+
+ /* my_int_arg tracepoint argument */
+ ctf_integer(
+ int,
+ my_int_arg_field,
+ my_int_arg
+ )
+
+ /* my_int_arg squared */
+ ctf_integer(
+ int,
+ my_int_arg_field2,
+ my_int_arg * my_int_arg
+ )
+
+ /* sum of first 4 characters of my_str_arg */
+ ctf_integer(
+ int,
+ sum4,
+ my_str_arg[0] + my_str_arg[1] +
+ my_str_arg[2] + my_str_arg[3]
+ )
+
+ /* my_str_arg as string field */
+ ctf_string(
+ my_str_arg_field, /* field name */
+ my_str_arg /* argument expression */
+ )
+
+ /* st_size member of st tracepoint argument, hexadecimal */
+ ctf_integer_hex(
+ off_t, /* field C type */
+ size_field, /* field name */
+ st->st_size /* argument expression */
+ )
+
+ /* st_size member of st tracepoint argument, as double */
+ ctf_float(
+ double, /* field C type */
+ size_dbl_field, /* field name */
+ (double) st->st_size /* argument expression */
+ )
+
+ /* half of my_str_arg string as text sequence */
+ ctf_sequence_text(
+ char, /* element C type */
+ half_my_str_arg_field, /* field name */
+ my_str_arg, /* argument expression */
+ size_t, /* length expression C type */
+ strlen(my_str_arg) / 2 /* length expression */
+ )
+ )
+)
+~~~
+
+As you can see, having a custom argument expression for each field
+makes tracepoints very flexible for tracing a user space C application.
+This tracepoint definition is reused later in this guide, when
+actually using tracepoints in a user space application.
--- /dev/null
+---
+id: c-application
+---
+
+Instrumenting a C (or C++) application, be it an executable program or
+a library, implies using LTTng-UST, the
+user space tracing component of LTTng. For C/C++ applications, the
+LTTng-UST package includes a dynamically loaded library
+(`liblttng-ust`), C headers and the `lttng-gen-tp` command line utility.
+
+Since C and C++ are the base languages of virtually all other
+programming languages
+(Java virtual machine, Python, Perl, PHP and Node.js interpreters, etc.),
+implementing user space tracing for an unsupported language is just a
+matter of using the LTTng-UST C API at the right places.
+
+The usual work flow to instrument a user space C application with
+LTTng-UST is:
+
+ 1. Define tracepoints (actual probes)
+ 2. Write tracepoint providers
+ 3. Insert tracepoints into target source code
+ 4. Package (build) tracepoint providers
+ 5. Build user application and link it with tracepoint providers
+
+The steps above are discussed in greater detail in the following
+subsections.
--- /dev/null
+---
+id: lttng-gen-tp
+---
+
+LTTng-UST ships with `lttng-gen-tp`, a handy command line utility for
+generating most of the stuff discussed above. It takes a _template file_,
+with a name usually ending with the `.tp` extension, containing only
+tracepoint definitions, and outputs a tracepoint provider (either a C
+source file or a precompiled object file) with its header file.
+
+`lttng-gen-tp` should suffice in [static linking](#doc-static-linking)
+situations. When using it, write a template file containing a list of
+`TRACEPOINT_EVENT()` macro calls. The tool will find the provider names
+used and generate the appropriate files which are going to look a lot
+like `tp.h` and `tp.c` above.
+
+Just call `lttng-gen-tp` like this:
+
+<pre class="term">
+lttng-gen-tp my-template.tp
+</pre>
+
+`my-template.c`, `my-template.o` and `my-template.h` will be created
+in the same directory.
+
+For more information on `lttng-gen-tp`, see
+<a href="/man/1/lttng-gen-tp" class="ext">its manpage</a>.
--- /dev/null
+---
+id: lttng-ust-environment-variables-compiler-flags
+---
+
+A few special environment variables and compile flags may affect the
+behavior of LTTng-UST.
+
+LTTng-UST's debugging can be activated by setting the environment
+variable `LTTNG_UST_DEBUG` to `1` when launching the application. It
+can also be enabled at compile time by defining `LTTNG_UST_DEBUG` when
+compiling LTTng-UST (using the `-DLTTNG_UST_DEBUG` compiler option).
+
+The environment variable `LTTNG_UST_REGISTER_TIMEOUT` can be used to
+specify how long the application should wait for the
+[session daemon](#doc-lttng-sessiond)'s _registration done_ command
+before proceeding to execute the main program. The timeout value is
+specified in milliseconds. 0 means _don't wait_. -1 means
+_wait forever_. Setting this environment variable to 0 is recommended
+for applications with time contraints on the process startup time.
+
+The default value of `LTTNG_UST_REGISTER_TIMEOUT` (when not defined)
+is **3000 ms**.
+
+The compilation definition `LTTNG_UST_DEBUG_VALGRIND` should be enabled
+at build time (`-DLTTNG_UST_DEBUG_VALGRIND`) to allow `liblttng-ust`
+to be used with <a href="http://valgrind.org/" class="ext">Valgrind</a>.
+The side effect of defining `LTTNG_UST_DEBUG_VALGRIND` is that per-CPU
+buffering is disabled.
--- /dev/null
+---
+id: probing-the-application-source-code
+---
+
+Once tracepoints are properly defined within a tracepoint provider,
+they may be inserted into the user application to be instrumented
+using the `tracepoint()` macro. Its first argument is the tracepoint
+provider name and its second is the tracepoint name. The next, optional
+arguments are defined by the `TP_ARGS()` part of the definition of
+the tracepoint to use.
+
+As an example, let us again take the following tracepoint definition:
+
+~~~ c
+TRACEPOINT_EVENT(
+ /* tracepoint provider name */
+ my_provider,
+
+ /* tracepoint/event name */
+ my_first_tracepoint,
+
+ /* list of tracepoint arguments */
+ TP_ARGS(
+ int, my_integer_arg,
+ char*, my_string_arg
+ ),
+
+ /* list of fields of eventual event */
+ TP_FIELDS(
+ ctf_string(my_string_field, my_string_arg)
+ ctf_integer(int, my_integer_field, my_integer_arg)
+ )
+)
+~~~
+
+Assuming this is part of a file named `tp.h` which defines the tracepoint
+provider and which is included by `tp.c`, here's a complete C application
+calling this tracepoint (multiple times):
+
+~~~ c
+#define TRACEPOINT_DEFINE
+#include "tp.h"
+
+int main(int argc, char* argv[])
+{
+ int i;
+
+ tracepoint(my_provider, my_first_tracepoint, 23, "Hello, World!");
+
+ for (i = 0; i < argc; ++i) {
+ tracepoint(my_provider, my_first_tracepoint, i, argv[i]);
+ }
+
+ return 0;
+}
+~~~
+
+`TRACEPOINT_DEFINE` must be defined into exactly one translation unit (C
+source file) of the user application, before including the tracepoint provider
+header file. `TRACEPOINT_DEFINE` is discussed further in
+[Building/linking tracepoint providers and the user application](#doc-building-tracepoint-providers-and-user-application).
+
+As another example, remember this definition we wrote in a previous
+section (comments are stripped):
+
+~~~ c
+/* for struct stat */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+TRACEPOINT_EVENT(
+ my_provider,
+ my_tracepoint,
+ TP_ARGS(
+ int, my_int_arg,
+ char*, my_str_arg,
+ struct stat*, st
+ ),
+ TP_FIELDS(
+ ctf_integer(int, my_constant_field, 23 + 17)
+ ctf_integer(int, my_int_arg_field, my_int_arg)
+ ctf_integer(int, my_int_arg_field2, my_int_arg * my_int_arg)
+ ctf_integer(int, sum4_field, my_str_arg[0] + my_str_arg[1] +
+ my_str_arg[2] + my_str_arg[3])
+ ctf_string(my_str_arg_field, my_str_arg)
+ ctf_integer_hex(off_t, size_field, st->st_size)
+ ctf_float(double, size_dbl_field, (double) st->st_size)
+ ctf_sequence_text(char, half_my_str_arg_field, my_str_arg,
+ size_t, strlen(my_str_arg) / 2)
+ )
+)
+~~~
+
+Here's an example of calling it:
+
+~~~ c
+#define TRACEPOINT_DEFINE
+#include "tp.h"
+
+int main(void)
+{
+ struct stat s;
+
+ stat("/etc/fstab", &s);
+
+ tracepoint(my_provider, my_tracepoint, 23, "Hello, World!", &s);
+
+ return 0;
+}
+~~~
+
+When viewing the trace, assuming the file size of `/etc/fstab` is
+301 bytes, the event generated by the execution of this tracepoint
+should have the following fields, in this order:
+
+~~~ text
+my_constant_field 40
+my_int_arg_field 23
+my_int_arg_field2 529
+sum4_field 389
+my_str_arg_field "Hello, World!"
+size_field 0x12d
+size_dbl_field 301.0
+half_my_str_arg_field "Hello,"
+~~~
--- /dev/null
+---
+id: tracef
+---
+
+`tracef()` is a small LTTng-UST API to avoid defining your own
+tracepoints and tracepoint providers. The signature of `tracef()` is
+the same as `printf()`'s.
+
+The `tracef()` utility function was developed to make user space tracing
+super simple, albeit with notable disadvantages compared to custom,
+full-fledged tracepoint providers:
+
+ * All generated events have the same provider/event names, respectively
+ `lttng-ust-tracef` and `event`.
+ * There's no static type checking.
+ * The only event field you actually get, named `msg`, is a string
+ potentially containing the values you passed to the function
+ using your own format. This also means that you cannot use filtering
+ using a custom expression at runtime because there are no isolated
+ fields.
+ * Since `tracef()` uses C standard library's `vasprintf()` function
+ in the background to format the strings at runtime, its
+ expected performance is lower than using custom tracepoint providers
+ with typed fields, which do not require a conversion to a string.
+
+Thus, `tracef()` is useful for quick prototyping and debugging, but
+should not be considered for any permanent/serious application
+instrumentation.
+
+To use `tracef()`, first include `<lttng/tracef.h>` in the C source file
+where you need to insert probes:
+
+~~~ c
+#include <lttng/tracef.h>
+~~~
+
+Use `tracef()` like you would use `printf()` in your source code, e.g.:
+
+~~~ c
+ /* ... */
+
+ tracef("my message, my integer: %d", my_integer);
+
+ /* ... */
+~~~
+
+Link your application with `liblttng-ust`:
+
+<pre class="term">
+gcc -o app app.c <strong>-llttng-ust</strong>
+</pre>
+
+Execute the application as usual:
+
+<pre class="term">
+./app
+</pre>
+
+Voilà! Use the `lttng` command line tool to
+[control tracing](#doc-controlling-tracing).
--- /dev/null
+---
+id: tracepoint-provider
+---
+
+Before jumping into defining tracepoints and inserting
+them into the application source code, you must understand what a
+_tracepoint provider_ is.
+
+For the sake of this guide, consider the following two files:
+
+`tp.h`:
+
+~~~ c
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER my_provider
+
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE "./tp.h"
+
+#if !defined(_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TP_H
+
+#include <lttng/tracepoint.h>
+
+TRACEPOINT_EVENT(
+ my_provider,
+ my_first_tracepoint,
+ TP_ARGS(
+ int, my_integer_arg,
+ char*, my_string_arg
+ ),
+ TP_FIELDS(
+ ctf_string(my_string_field, my_string_arg)
+ ctf_integer(int, my_integer_field, my_integer_arg)
+ )
+)
+
+TRACEPOINT_EVENT(
+ my_provider,
+ my_other_tracepoint,
+ TP_ARGS(
+ int, my_int
+ ),
+ TP_FIELDS(
+ ctf_integer(int, some_field, my_int)
+ )
+)
+
+#endif /* _TP_H */
+
+#include <lttng/tracepoint-event.h>
+~~~
+
+`tp.c`:
+
+~~~ c
+#define TRACEPOINT_CREATE_PROBES
+
+#include "tp.h"
+~~~
+
+The two files above are defining a _tracepoint provider_. A tracepoint
+provider is some sort of namespace for _tracepoint definitions_. Tracepoint
+definitions are written above with the `TRACEPOINT_EVENT()` macro, and allow
+eventual `tracepoint()` calls respecting their definitions to be inserted
+into the user application's C source code (we explore this in a
+later section).
+
+Many tracepoint definitions may be part of the same tracepoint provider
+and many tracepoint providers may coexist in a user space application. A
+tracepoint provider is packaged either:
+
+ * directly into an existing user application's C source file
+ * as an object file
+ * as a static library
+ * as a shared library
+
+The two files above, `tp.h` and `tp.c`, show a typical template for
+writing a tracepoint provider. LTTng-UST was designed so that two
+tracepoint providers should not be defined in the same header file.
+
+We will now go through the various parts of the above files and
+give them a meaning. As you may have noticed, the LTTng-UST API for
+C/C++ applications is some preprocessor sorcery. The LTTng-UST macros
+used in your application and those in the LTTng-UST headers are
+combined to produce actual source code needed to make tracing possible
+using LTTng.
+
+Let's start with the header file, `tp.h`. It begins with
+
+~~~ c
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER my_provider
+~~~
+
+`TRACEPOINT_PROVIDER` defines the name of the provider to which the
+following tracepoint definitions will belong. It is used internally by
+LTTng-UST headers and _must_ be defined. Since `TRACEPOINT_PROVIDER`
+could have been defined by another header file also included by the same
+C source file, the best practice is to undefine it first.
+
+<div class="tip">
+<p><span class="t">Note:</span>Names in LTTng-UST follow the C
+<em>identifier</em> syntax (starting with a letter and containing either
+letters, numbers or underscores); they are <em>not</em> C strings
+(not surrounded by double quotes). This is because LTTng-UST macros
+use those identifier-like strings to create symbols (named types and
+variables).</p>
+</div>
+
+The tracepoint provider is a group of tracepoint definitions; its chosen
+name should reflect this. A hierarchy like Java packages is recommended,
+using underscores instead of dots, e.g., `org_company_project_component`.
+
+Next is `TRACEPOINT_INCLUDE`:
+
+~~~ c
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE "./tp.h"
+~~~
+
+This little bit of instrospection is needed by LTTng-UST to include
+your header at various predefined places.
+
+Include guard follows:
+
+~~~ c
+#if !defined(_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TP_H
+~~~
+
+Add this precompiler conditionals to ensure the tracepoint event generation
+can include this file more than once.
+
+The `TRACEPOINT_EVENT()` macro is defined in a LTTng-UST header file which
+must be included:
+
+~~~ c
+#include <lttng/tracepoint.h>
+~~~
+
+This will also allow the application to use the `tracepoint()` macro.
+
+Next is a list of `TRACEPOINT_EVENT()` macro calls which create the
+actual tracepoint definitions. We will skip this for the moment and
+come back to how to use `TRACEPOINT_EVENT()`
+[in a later section](#doc-defining-tracepoints). Just pay attention to
+the first argument: it's always the name of the tracepoint provider
+being defined in this header file.
+
+End of include guard:
+
+~~~ c
+#endif /* _TP_H */
+~~~
+
+Finally, include `<lttng/tracepoint-event.h>` to expand the macros:
+
+~~~ c
+#include <lttng/tracepoint-event.h>
+~~~
+
+That's it for `tp.h`. Of course, this is only a header file; it must be
+included in some C source file to actually use it. This is the job of
+`tp.c`:
+
+~~~ c
+#define TRACEPOINT_CREATE_PROBES
+
+#include "tp.h"
+~~~
+
+When `TRACEPOINT_CREATE_PROBES` is defined, the macros used in `tp.h`,
+which is included just after, will actually create the source code for
+LTTng-UST probes (global data structures and functions) out of your
+tracepoint definitions. How exactly this is done is out of this text's scope.
+`TRACEPOINT_CREATE_PROBES` is discussed further
+in [Building/linking tracepoint providers and the user application](#doc-building-tracepoint-providers-and-user-application).
+
+You could include other header files like `tp.h` here to create the probes
+of different tracepoint providers, e.g.:
+
+~~~ c
+#define TRACEPOINT_CREATE_PROBES
+
+#include "tp1.h"
+#include "tp2.h"
+~~~
+
+The rule is: probes of a given tracepoint provider
+must be created in exactly one source file. This source file could be one
+of your project's; it doesn't have to be on its own like `tp.c`, although
+[a later section](#doc-building-tracepoint-providers-and-user-application)
+shows that doing so allows packaging the tracepoint providers
+independently and keep them out of your application, also making it
+possible to reuse them between projects.
+
+The following sections explain how to define tracepoints, how to use the
+`tracepoint()` macro to instrument your user space C application and how
+to build/link tracepoint providers and your application with LTTng-UST
+support.
--- /dev/null
+---
+id: cxx-application
+---
+
+Because of C++'s cross-compatibility with the C language, C++
+applications can be readily instrumented with the LTTng-UST C API.
+
+Follow the [C application](#doc-c-application) user guide above. It
+should be noted that, in this case, tracepoint providers should have
+the typical `.cpp`, `.cxx` or `.cc` extension and be built with `g++`
+instead of `gcc`. This is the easiest way of avoiding linking errors
+due to symbol name mangling incompatibilities between both languages.
--- /dev/null
+---
+id: instrumenting-linux-kernel-tracing
+---
+
+The [Controlling tracing](#doc-controlling-tracing) section explains
+how to use the `lttng` tool to create and control tracing sessions.
+Although the `lttng` tool will load the appropriate _known_ LTTng kernel
+modules when needed (by launching `root`'s session daemon), it won't
+load your custom `linux-probe-hello` module by default. You need to
+manually start an LTTng session daemon as `root` and use the
+`--extra-kmod-probes` option to append your custom probe module to the
+default list:
+
+<pre class="term">
+sudo pkill -u root lttng-sessiond
+sudo lttng-sessiond --extra-kmod-probes=hello
+</pre>
+
+The first command makes sure any existing instance is killed. If
+you're not interested in using the default probes, or if you only
+want to use a few of them, you could use `--kmod-probes` instead,
+which specifies an absolute list:
+
+<pre class="term">
+sudo lttng-sessiond --kmod-probes=ext4,sched,hello
+</pre>
+
+Confirm the custom probe module is loaded:
+
+<pre class="term">
+lsmod | grep lttng_probe_hello
+</pre>
+
+The `hello_world` event should appear in the list when doing
+
+<pre class="term">
+lttng list --kernel | grep hello
+</pre>
+
+You may now create an LTTng tracing session, enable the `hello_world`
+kernel event (and others if you wish) and start tracing:
+
+<pre class="term">
+sudo lttng create my-session
+sudo lttng enable-event --kernel hello_world
+sudo lttng start
+</pre>
+
+Plug a few USB devices, then stop tracing and inspect the trace (if
+<a href="http://www.efficios.com/babeltrace" class="ext">Babeltrace</a>
+is installed):
+
+<pre class="term">
+sudo lttng stop
+sudo lttng view
+</pre>
+
+Here's a sample output:
+
+~~~ text
+[15:30:34.835895035] (+?.?????????) hostname hello_world: { cpu_id = 1 }, { my_int = 8, char0 = 68, char1 = 97, product = "DataTraveler 2.0" }
+[15:30:42.262781421] (+7.426886386) hostname hello_world: { cpu_id = 1 }, { my_int = 9, char0 = 80, char1 = 97, product = "Patriot Memory" }
+[15:30:48.175621778] (+5.912840357) hostname hello_world: { cpu_id = 1 }, { my_int = 10, char0 = 68, char1 = 97, product = "DataTraveler 2.0" }
+~~~
+
+Two USB flash drives were used for this test.
+
+You may change your LTTng custom probe, rebuild it and reload it at
+any time when not tracing. Make sure you remove the old module
+(either by killing the root LTTng session daemon which loaded the
+module in the first place, or by using `modprobe --remove` directly)
+before loading the updated one.
--- /dev/null
+---
+id: instrumenting-linux-kernel-itself
+---
+
+This section explains strictly how to add custom LTTng
+instrumentation to the Linux kernel. It does not explain how the
+macros actually work and the internal mechanics of the tracer.
+
+You should have a Linux kernel source code tree to work with.
+Throughout this section, all file paths are relative to the root of
+this tree unless otherwise stated.
+
+You will need a copy of the LTTng-modules Git repository:
+
+<pre class="term">
+git clone git://git.lttng.org/lttng-modules.git
+</pre>
+
+The steps to add custom LTTng instrumentation to a Linux kernel
+involves defining and using the mainline `TRACE_EVENT()` tracepoints
+first, then writing and using the LTTng adaptation layer.
--- /dev/null
+---
+id: lttng-adaptation-layer
+---
+
+The steps to write the LTTng adaptation layer are, in your
+LTTng-modules copy's source code tree:
+
+ 1. In `instrumentation/events/lttng-module`,
+ add a header <code><em>subsys</em>.h</code> for your custom
+ subsystem <code><em>subsys</em></code> and write your
+ tracepoint definitions using LTTng-modules macros in it.
+ Those macros look like the mainline kernel equivalents,
+ but they present subtle, yet important differences.
+ 2. In `probes`, create the C source file of the LTTng probe kernel
+ module for your subsystem. It should be named
+ <code>lttng-probe-<em>subsys</em>.c</code>.
+ 3. Edit `probes/Makefile` so that the LTTng-modules project
+ builds your custom LTTng probe kernel module.
+ 4. Build and install LTTng kernel modules.
+
+Following our `hello_world` event example, here's the content of
+`instrumentation/events/lttng-module/hello.h`:
+
+~~~ c
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM hello
+
+#if !defined(_TRACE_HELLO_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_HELLO_H
+
+#include <linux/tracepoint.h>
+
+LTTNG_TRACEPOINT_EVENT(
+ /* format identical to mainline version for those */
+ hello_world,
+ TP_PROTO(int foo, const char* bar),
+ TP_ARGS(foo, bar),
+
+ /* possible differences */
+ TP_STRUCT__entry(
+ __field(int, my_int)
+ __field(char, char0)
+ __field(char, char1)
+ __string(product, bar)
+ ),
+
+ /* notice the use of tp_assign()/tp_strcpy() and no semicolons */
+ TP_fast_assign(
+ tp_assign(my_int, foo)
+ tp_assign(char0, bar[0])
+ tp_assign(char1, bar[1])
+ tp_strcpy(product, bar)
+ ),
+
+ /* This one is actually not used by LTTng either, but must be
+ * present for the moment.
+ */
+ TP_printk("", 0)
+
+/* no semicolon after this either */
+)
+
+#endif
+
+/* other difference: do NOT include <trace/define_trace.h> */
+#include "../../../probes/define_trace.h"
+~~~
+
+Some possible entries for `TP_STRUCT__entry()` and `TP_fast_assign()`,
+in the case of LTTng-modules, are shown in the
+[LTTng-modules reference](#doc-lttng-modules-ref) section.
+
+The best way to learn how to use the above macros is to inspect
+existing LTTng tracepoint definitions in `instrumentation/events/lttng-module`
+header files. Compare them with the Linux kernel mainline versions
+in `include/trace/events`.
+
+The next step is writing the LTTng probe kernel module C source file.
+This one is named <code>lttng-probe-<em>subsys</em>.c</code>
+in `probes`. You may always use the following template:
+
+~~~ c
+#include <linux/module.h>
+#include "../lttng-tracer.h"
+
+/* Build time verification of mismatch between mainline TRACE_EVENT()
+ * arguments and LTTng adaptation layer LTTNG_TRACEPOINT_EVENT() arguments.
+ */
+#include <trace/events/hello.h>
+
+/* create LTTng tracepoint probes */
+#define LTTNG_PACKAGE_BUILD
+#define CREATE_TRACE_POINTS
+#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module
+
+#include "../instrumentation/events/lttng-module/hello.h"
+
+MODULE_LICENSE("GPL and additional rights");
+MODULE_AUTHOR("Your name <your-email>");
+MODULE_DESCRIPTION("LTTng hello probes");
+MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "."
+ __stringify(LTTNG_MODULES_MINOR_VERSION) "."
+ __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION)
+ LTTNG_MODULES_EXTRAVERSION);
+~~~
+
+Just replace `hello` with your subsystem name. In this example,
+`<trace/events/hello.h>`, which is the original mainline tracepoint
+definition header, is included for verification purposes: the
+LTTng-modules build system is able to emit an error at build time when
+the arguments of the mainline `TRACE_EVENT()` definitions do not match
+the ones of the LTTng-modules adaptation layer
+(`LTTNG_TRACEPOINT_EVENT()`).
+
+Edit `probes/Makefile` and add your new kernel module object
+next to existing ones:
+
+~~~ makefile
+# ...
+
+obj-m += lttng-probe-module.o
+obj-m += lttng-probe-power.o
+
+obj-m += lttng-probe-hello.o
+
+# ...
+~~~
+
+Time to build! Point to your custom Linux kernel source tree using
+the `KERNELDIR` variable:
+
+<pre class="term">
+make <strong>KERNELDIR=/path/to/custom/linux</strong>
+</pre>
+
+Finally, install modules:
+
+<pre class="term">
+sudo make modules_install
+</pre>
--- /dev/null
+---
+id: mainline-trace-event
+---
+
+The first step is to define tracepoints using the mainline Linux
+`TRACE_EVENT()` macro and insert tracepoints where you want them.
+Your tracepoint definitions reside in a header file in
+`include/trace/events`. If you're adding tracepoints to an existing
+subsystem, edit its appropriate header file.
+
+As an example, the following header file (let's call it
+`include/trace/events/hello.h`) defines one tracepoint using
+`TRACE_EVENT()`:
+
+~~~ c
+/* subsystem name is "hello" */
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM hello
+
+#if !defined(_TRACE_HELLO_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_HELLO_H
+
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(
+ /* "hello" is the subsystem name, "world" is the event name */
+ hello_world,
+
+ /* tracepoint function prototype */
+ TP_PROTO(int foo, const char* bar),
+
+ /* arguments for this tracepoint */
+ TP_ARGS(foo, bar),
+
+ /* LTTng doesn't need those */
+ TP_STRUCT__entry(),
+ TP_fast_assign(),
+ TP_printk("", 0)
+);
+
+#endif
+
+/* this part must be outside protection */
+#include <trace/define_trace.h>
+~~~
+
+Notice that we don't use any of the last three arguments: they
+are left empty here because LTTng doesn't need them. You would only fill
+`TP_STRUCT__entry()`, `TP_fast_assign()` and `TP_printk()` if you were
+to also use this tracepoint for ftrace/perf.
+
+Once this is done, you may place calls to `trace_hello_world()`
+wherever you want in the Linux source code. As an example, let us place
+such a tracepoint in the `usb_probe_device()` static function
+(`drivers/usb/core/driver.c`):
+
+~~~ c
+/* called from driver core with dev locked */
+static int usb_probe_device(struct device *dev)
+{
+ struct usb_device_driver *udriver = to_usb_device_driver(dev->driver);
+ struct usb_device *udev = to_usb_device(dev);
+ int error = 0;
+
+ trace_hello_world(udev->devnum, udev->product);
+
+ /* ... */
+}
+~~~
+
+This tracepoint should fire every time a USB device is plugged in.
+
+At the top of `driver.c`, we need to include our actual tracepoint
+definition and, in this case (one place per subsystem), define
+`CREATE_TRACE_POINTS`, which will create our tracepoint:
+
+~~~ c
+/* ... */
+
+#include "usb.h"
+
+#define CREATE_TRACE_POINTS
+#include <trace/events/hello.h>
+
+/* ... */
+~~~
+
+Build your custom Linux kernel. In order to use LTTng, make sure the
+following kernel configuration options are enabled:
+
+ * `CONFIG_MODULES` (loadable module support)
+ * `CONFIG_KALLSYMS` (load all symbols for debugging/kksymoops)
+ * `CONFIG_HIGH_RES_TIMERS` (high resolution timer support)
+ * `CONFIG_TRACEPOINTS` (kernel tracepoint instrumentation)
+
+Boot the custom kernel. The directory
+`/sys/kernel/debug/tracing/events/hello` should exist if everything
+went right, with a `hello_world` subdirectory.
--- /dev/null
+---
+id: instrumenting-out-of-tree-linux-kernel
+---
+
+Instrumenting a custom Linux kernel module for LTTng follows the exact
+same steps as
+[adding instrumentation to the Linux kernel itself](#doc-instrumenting-linux-kernel-itself),
+the only difference being that your mainline tracepoint definition
+header doesn't reside in the mainline source tree, but in your
+kernel module source tree.
+
+The only reference to this mainline header is in the LTTng custom
+probe's source code (`probes/lttng-probe-hello.c` in our example), for
+build time verification:
+
+~~~ c
+/* ... */
+
+/* Build time verification of mismatch between mainline TRACE_EVENT()
+ * arguments and LTTng adaptation layer LTTNG_TRACEPOINT_EVENT() arguments.
+ */
+#include <trace/events/hello.h>
+
+/* ... */
+~~~
+
+The preferred, flexible way to include your module's mainline
+tracepoint definition header is to put it in a specific directory
+relative to your module's root, e.g., `tracepoints`, and include it
+relative to your module's root directory in the LTTng custom probe's
+source:
+
+~~~ c
+#include <tracepoints/hello.h>
+~~~
+
+You may then build LTTng-modules by adding your module's root
+directory as an include path to the extra C flags:
+
+<pre class="term">
+make <strong>ccflags-y=-I/path/to/kernel/module</strong> KERNELDIR=/path/to/custom/linux
+</pre>
+
+Using `ccflags-y` allows you to move your kernel module to another
+directory and rebuild the LTTng-modules project with no change to
+source files.
--- /dev/null
+---
+id: instrumenting-linux-kernel
+---
+
+The Linux kernel can be instrumented for LTTng tracing, either its core
+source code or a kernel module. It has to be noted that Linux is
+readily traceable using LTTng since many parts of its source code are
+already instrumented: this is the job of the upstream
+<a href="http://git.lttng.org/?p=lttng-modules.git" class="ext">LTTng-modules</a>
+package. This section presents how to add LTTng instrumentation where it
+does not currently exist and how to instrument custom kernel modules.
+
+All LTTng instrumentation in the Linux kernel is based on an existing
+infrastructure which bears the name of its main macro, `TRACE_EVENT()`.
+This macro is used to define tracepoints,
+each tracepoint having a name, usually with the
+<code><em>subsys</em>_<em>name</em></code> format,
+<code><em>subsys</em></code> being the subsystem name and
+<code><em>name</em></code> the specific event name.
+
+Tracepoints defined with `TRACE_EVENT()` may be inserted anywhere in
+the Linux kernel source code, after what callbacks, called _probes_,
+may be registered to execute some action when a tracepoint is
+executed. This mechanism is directly used by ftrace and perf,
+but cannot be used as is by LTTng: an adaptation layer is added to
+satisfy LTTng's specific needs.
+
+With that in mind, this documentation does not cover the `TRACE_EVENT()`
+format and how to use it, but it is mandatory to understand it and use
+it to instrument Linux for LTTng. A series of
+<abbr title="Linux Weekly News">LWN</abbr> articles explain
+`TRACE_EVENT()` in details:
+<a href="http://lwn.net/Articles/379903/" class="ext">part 1</a>,
+<a href="http://lwn.net/Articles/381064/" class="ext">part 2</a>, and
+<a href="http://lwn.net/Articles/383362/" class="ext">part 3</a>.
+Once you master `TRACE_EVENT()` enough for your use case, continue
+reading this section so that you can add the LTTng adaptation layer of
+instrumentation.
+
+This section first discusses the general method of instrumenting the
+Linux kernel for LTTng. This method is then reused for the specific
+case of instrumenting a kernel module.
--- /dev/null
+---
+id: instrumenting
+---
+
+There are many examples of tracing and monitoring in our everyday life.
+You have access to real-time and historical weather reports and forecasts
+thanks to weather stations installed around the country. You know your
+possibly hospitalized friends' and family's hearts are safe thanks to
+electrocardiography. You make sure not to drive your car too fast
+and have enough fuel to reach your destination thanks to gauges visible
+on your dashboard.
+
+All the previous examples have something in common: they rely on
+**probes**. Without electrodes attached to the surface of a body's
+skin, cardiac monitoring would be futile.
+
+LTTng, as a tracer, is no different from the real life examples above.
+If you're about to trace a software system, i.e. record its history of
+execution, you better have probes in the subject you're
+tracing: the actual software. Various ways were developed to do this.
+The most straightforward one is to manually place probes, called
+_tracepoints_, in the software's source code. The Linux kernel tracing
+domain also allows probes added dynamically.
+
+If you're only interested in tracing the Linux kernel, it may very well
+be that your tracing needs are already appropriately covered by LTTng's
+built-in Linux kernel tracepoints and other probes. Or you may be in
+possession of a user space application which has already been
+instrumented. In such cases, the work will reside entirely in the design
+and execution of tracing sessions, allowing you to jump to
+[Controlling tracing](#doc-controlling-tracing) right now.
+
+This section focuses on the following use cases of instrumentation:
+
+ * [C](#doc-c-application) and [C++](#doc-cxx-application) applications
+ * [prebuilt user space tracing helpers](#doc-prebuilt-ust-helpers)
+ * [Java application](#doc-java-application)
+ * [Linux kernel](#doc-instrumenting-linux-kernel) module or the
+ kernel itself
+ * the [`/proc/lttng-logger` <abbr title="Application Binary Interface">ABI</abbr>](#doc-proc-lttng-logger-abi)
+
+Some [advanced techniques](#doc-advanced-instrumenting-techniques) are
+also presented at the very end.
--- /dev/null
+---
+id: java-application
+---
+
+LTTng-UST provides a _logging_ back-end for Java applications using
+<a href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html" class="ext">Java Util Logging</a> (JUL). This back-end is called the _LTTng-UST JUL agent_ and is
+responsible for communications with an LTTng session daemon.
+
+From the user's point of view, once the LTTng-UST JUL agent has been
+initialized, JUL loggers may be created and used as usual. The agent
+adds its own handler to the _root logger_, so that all loggers may
+generate LTTng events with no effort.
+
+Common JUL features are supported using the `lttng` tool
+(see [Controlling tracing](#doc-controlling-tracing)):
+
+ * listing all logger names
+ * enabling/disabling events per logger name
+ * JUL log levels
+
+Here's an example:
+
+~~~ java
+import java.util.logging.Logger;
+import org.lttng.ust.jul.LTTngAgent;
+
+public class Test
+{
+ public static void main(String[] argv) throws Exception
+ {
+ // create a logger
+ Logger logger = Logger.getLogger("jello");
+
+ // call this as soon as possible (before logging)
+ LTTngAgent lttngAgent = LTTngAgent.getLTTngAgent();
+
+ // log at will!
+ logger.info("some info");
+ logger.warning("some warning");
+ Thread.sleep(500);
+ logger.finer("finer information...");
+ Thread.sleep(123);
+ logger.severe("error!");
+
+ // not mandatory, but cleaner
+ lttngAgent.dispose();
+ }
+}
+~~~
+
+The LTTng-UST JUL agent Java classes are packaged in a JAR file named
+`liblttng-ust-jul.jar`. It is typically located in
+`/usr/lib/lttng/java`. To compile the snippet above
+(saved as `Test.java`), do:
+
+<pre class="term">
+javac -cp /usr/lib/lttng/java/liblttng-ust-jul.jar Test.java
+</pre>
+
+You can run the resulting compiled class:
+
+<pre class="term">
+java -cp /usr/lib/lttng/java/liblttng-ust-jul.jar:. Test
+</pre>
+
+<div class="tip">
+<p>
+ <span class="t">Note:</span><a href="http://openjdk.java.net/" class="ext">OpenJDK</a> 7
+ is used for development and continuous integration, thus this
+ version is directly supported. However, the LTTng-UST JUL agent has
+ also been tested with OpenJDK 6.
+</p>
+</div>
--- /dev/null
+---
+id: prebuilt-ust-helpers
+---
+
+The LTTng-UST package provides a few helpers that one may find
+useful in some situations. They all work the same way: you must
+preload the appropriate shared object before running the user
+application (using the `LD_PRELOAD` environment variable).
+
+The shared objects are normally found in `/usr/lib`.
+
+The current installed helpers are:
+
+ * `liblttng-ust-libc-wrapper.so` and
+ `liblttng-ust-pthread-wrapper.so`:
+ [C standard library and POSIX threads tracing](#doc-liblttng‑ust‑libc‑pthread-wrapper)
+ * `liblttng-ust-cyg-profile.so` and
+ `liblttng-ust-cyg-profile-fast.so`:
+ [function tracing](#doc-liblttng‑ust‑cyg‑profile)
+ * `liblttng-ust-dl.so`:
+ [dynamic linker tracing](#doc-liblttng‑ust‑dl)
+
+The following subsections document what helpers instrument exactly
+and how to use them.
--- /dev/null
+---
+id: liblttng‑ust‑cyg‑profile
+---
+
+Function tracing is the recording of which functions are entered and
+left during the execution of an application. Like with any LTTng event,
+the precise time at which this happens is also kept.
+
+GCC and clang have an option named
+<a href="https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/Code-Gen-Options.html" class="ext"><code>-finstrument-functions</code></a>
+which generates instrumentation calls for entry and exit to functions.
+The LTTng-UST function tracing helpers, `liblttng-ust-cyg-profile.so`
+and `liblttng-ust-cyg-profile-fast.so`, take advantage of this feature
+to add instrumentation to the two generated functions (which contain
+`cyg_profile` in their names, hence the shared object's name).
+
+In order to use LTTng-UST function tracing, the translation units to
+instrument must be built using the `-finstrument-functions` compiler
+flag.
+
+LTTng-UST function tracing comes in two flavors, each providing
+different trade-offs: `liblttng-ust-cyg-profile-fast.so` and
+`liblttng-ust-cyg-profile.so`.
+
+**`liblttng-ust-cyg-profile-fast.so`** is a lightweight variant that
+should only be used where it can be _guaranteed_ that the complete event
+stream is recorded without any missing events. Any kind of duplicate
+information is left out. This version registers the following
+tracepoints:
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th><abbr title="Tracepoint">TP</abbr> provider name</th>
+ <th><abbr title="Tracepoint">TP</abbr> name</th>
+ <th>Description/fields</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td rowspan="2">
+ <code class="no-bg">lttng_ust_cyg_profile_fast</code>
+ </td>
+ <td>
+ <code class="no-bg">func_entry</code>
+ </td>
+ <td>
+ <p>Function entry</p>
+
+ <ul>
+ <li>
+ <code class="arg">addr</code> address of the
+ called function
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">func_exit</code>
+ </td>
+ <td>
+ <p>Function exit</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+Assuming no event is lost, having only the function addresses on entry
+is enough for creating a call graph (remember that a recorded event
+always contains the ID of the CPU that generated it). A tool like
+<a href="https://sourceware.org/binutils/docs/binutils/addr2line.html" class="ext"><code>addr2line</code></a>
+may be used to convert function addresses back to source files names
+and line numbers.
+
+The other helper,
+**`liblttng-ust-cyg-profile.so`**,
+is a more robust variant which also works for use cases where
+events might get discarded or not recorded from application startup.
+In these cases, the trace analyzer needs extra information to be
+able to reconstruct the program flow. This version registers the
+following tracepoints:
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th><abbr title="Tracepoint">TP</abbr> provider name</th>
+ <th><abbr title="Tracepoint">TP</abbr> name</th>
+ <th>Description/fields</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td rowspan="2">
+ <code class="no-bg">lttng_ust_cyg_profile</code>
+ </td>
+ <td>
+ <code class="no-bg">func_entry</code>
+ </td>
+ <td>
+ <p>Function entry</p>
+
+ <ul>
+ <li>
+ <code class="arg">addr</code> address of the
+ called function
+ </li>
+ <li>
+ <code class="arg">call_site</code> call site
+ address
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">func_exit</code>
+ </td>
+ <td>
+ <p>Function exit</p>
+
+ <ul>
+ <li>
+ <code class="arg">addr</code> address of the
+ called function
+ </li>
+ <li>
+ <code class="arg">call_site</code> call site
+ address
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+To use one or the other variant with any user application, assuming at
+least one translation unit of the latter is compiled with the
+`-finstrument-functions` option, do:
+
+<pre class="term">
+LD_PRELOAD=liblttng-ust-cyg-profile-fast.so my-app
+</pre>
+
+or
+
+<pre class="term">
+LD_PRELOAD=liblttng-ust-cyg-profile.so my-app
+</pre>
+
+It might be necessary to limit the number of source files where
+`-finstrument-functions` is used to prevent excessive amount of trace
+data to be generated at runtime.
+
+<div class="tip">
+<p>
+ <span class="t">Tip:</span> When using GCC, at least, you may use
+ the
+ <code>-finstrument-functions-exclude-function-list</code>
+ option to avoid instrumenting entries and exits of specific
+ symbol names.
+</p>
+</div>
+
+All events generated from LTTng-UST function tracing are provided on
+log level `TRACE_DEBUG_FUNCTION`, which is useful to easily enable
+function tracing events in your tracing session using the
+`--loglevel-only` option of `lttng enable-event`
+(see [Controlling tracing](#doc-controlling-tracing)).
--- /dev/null
+---
+id: liblttng‑ust‑dl
+---
+
+This LTTng-UST helper causes all calls to `dlopen()` and `dlclose()`
+in the target application to be traced with LTTng.
+
+The helper's shared object, `liblttng-ust-dl.so`, registers the
+following tracepoints when preloaded:
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th><abbr title="Tracepoint">TP</abbr> provider name</th>
+ <th><abbr title="Tracepoint">TP</abbr> name</th>
+ <th>Description/fields</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td rowspan="2">
+ <code class="no-bg">ust_baddr</code>
+ </td>
+ <td>
+ <code class="no-bg">push</code>
+ </td>
+ <td>
+ <p><code>dlopen()</code> call</p>
+
+ <ul>
+ <li>
+ <code class="arg">baddr</code> memory
+ base address
+ (where the dynamic linker placed the shared
+ object)
+ </li>
+ <li>
+ <code class="arg">sopath</code> file system
+ path to the loaded shared object
+ </li>
+ <li>
+ <code class="arg">size</code> file size
+ of the the loaded shared object
+ </li>
+ <li>
+ <code class="arg">mtime</code> last
+ modification time (seconds since Epoch time)
+ of the loaded shared object
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">pop</code>
+ </td>
+ <td>
+ <p><code>dlclose()</code> call</p>
+
+ <ul>
+ <li>
+ <code class="arg">baddr</code> memory
+ base address
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+To use this LTTng-UST helper with any user application, independently of
+how the latter is built, do:
+
+<pre class="term">
+LD_PRELOAD=liblttng-ust-dl.so my-app
+</pre>
+
+Of course, like any other tracepoint, the ones above need to be enabled
+in order for LTTng-UST to generate events. This is done using the
+`lttng` command line tool
+(see [Controlling tracing](#doc-controlling-tracing)).
--- /dev/null
+---
+id: liblttng‑ust‑libc‑pthread-wrapper
+---
+
+`liblttng-ust-libc-wrapper.so` and `liblttng-ust-pthread-wrapper.so`
+can add instrumentation to respectively some C standard library and
+POSIX threads functions.
+
+The following functions are traceable by `liblttng-ust-libc-wrapper.so`:
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th><abbr title="Tracepoint">TP</abbr> provider name</th>
+ <th><abbr title="Tracepoint">TP</abbr> name</th>
+ <th>Instrumented function</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td rowspan="6">
+ <code class="no-bg">ust_libc</code>
+ </td>
+ <td>
+ <code class="no-bg">malloc</code>
+ </td>
+ <td>
+ <code class="no-bg">malloc()</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">calloc</code>
+ </td>
+ <td>
+ <code class="no-bg">calloc()</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">realloc</code>
+ </td>
+ <td>
+ <code class="no-bg">realloc()</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">free</code>
+ </td>
+ <td>
+ <code class="no-bg">free()</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">memalign</code>
+ </td>
+ <td>
+ <code class="no-bg">memalign()</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">posix_memalign</code>
+ </td>
+ <td>
+ <code class="no-bg">posix_memalign()</code>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+The following functions are traceable by
+`liblttng-ust-pthread-wrapper.so`:
+
+<table class="func-desc">
+ <thead>
+ <tr>
+ <th><abbr title="Tracepoint">TP</abbr> provider name</th>
+ <th><abbr title="Tracepoint">TP</abbr> name</th>
+ <th>Instrumented function</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td rowspan="4">
+ <code class="no-bg">ust_pthread</code>
+ </td>
+ <td>
+ <code class="no-bg">pthread_mutex_lock_req</code>
+ </td>
+ <td>
+ <code class="no-bg">pthread_mutex_lock()</code> (request time)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">pthread_mutex_lock_acq</code>
+ </td>
+ <td>
+ <code class="no-bg">pthread_mutex_lock()</code> (acquire time)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">pthread_mutex_trylock</code>
+ </td>
+ <td>
+ <code class="no-bg">pthread_mutex_trylock()</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code class="no-bg">pthread_mutex_unlock</code>
+ </td>
+ <td>
+ <code class="no-bg">pthread_mutex_unlock()</code>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+All tracepoints have fields corresponding to the arguments of the
+function they instrument.
+
+To use one or the other with any user application, independently of
+how the latter is built, do:
+
+<pre class="term">
+LD_PRELOAD=liblttng-ust-libc-wrapper.so my-app
+</pre>
+
+or
+
+<pre class="term">
+LD_PRELOAD=liblttng-ust-pthread-wrapper.so my-app
+</pre>
+
+To use both, do:
+
+<pre class="term">
+LD_PRELOAD="liblttng-ust-libc-wrapper.so liblttng-ust-pthread-wrapper.so" my-app
+</pre>
+
+When the shared object is preloaded, it effectively replaces the
+functions listed in the above tables by wrappers which add tracepoints
+and call the replaced functions.
+
+Of course, like any other tracepoint, the ones above need to be enabled
+in order for LTTng-UST to generate events. This is done using the
+`lttng` command line tool
+(see [Controlling tracing](#doc-controlling-tracing)).
--- /dev/null
+---
+id: proc-lttng-logger-abi
+---
+
+The `lttng-tracer` Linux kernel module, installed by the LTTng-modules
+package, creates a special LTTng logger ABI file `/proc/lttng-logger`
+when loaded. Writing text data to this file generates an LTTng kernel
+domain event named `lttng_logger`.
+
+Unlike other kernel domain events, `lttng_logger` may be enabled by
+any user, not only root users or members of the tracing group.
+
+To use the LTTng logger ABI, simply write a string to
+`/proc/lttng-logger`:
+
+<pre class="term">
+echo -n 'Hello, World!' > /proc/lttng-logger
+</pre>
+
+The `msg` field of the `lttng_logger` event contains the recorded
+message.
+
+<div class="tip">
+<p>
+ <span class="t">Note:</span>Messages are split in chunks of
+ 1024 bytes.
+</p>
+</div>
+
+The LTTng logger ABI is a quick and easy way to trace some events from
+user space through the kernel tracer. However, it is much more basic
+than LTTng-UST: it's slower (involves system call round-trip to the
+kernel and only supports logging strings). The LTTng logger ABI is
+particularly useful for recording logs as LTTng traces from shell
+scripts, potentially combining them with other Linux kernel/user space
+events.
--- /dev/null
+---
+id: using-lttng
+---
+
+Using LTTng involves two main activities: **instrumenting** and
+**controlling tracing**.
+
+_[Instrumenting](#doc-instrumenting)_ is the process of inserting probes
+into some source code. It can be done manually, by writing tracepoint
+calls at specific locations in the source code of the program to trace,
+or more automatically using dynamic probes (address in assembled code,
+symbol name, function entry/return, etc.).
+
+It has to be noted that, as an LTTng user, you may not have to worry
+about the instrumentation process. Indeed, you may want to trace a
+program already instrumented. As an example, the Linux kernel is
+thoroughly instrumented, which is why you can trace it without caring
+about adding probes.
+
+_[Controlling tracing](#doc-controlling-tracing)_ is everything
+that can be done by the LTTng session daemon, which is controlled using
+`liblttng-ctl` or its command line utility, `lttng`: creating tracing
+sessions, listing tracing sessions and events, enabling/disabling
+events, starting/stopping the tracers, taking snapshots, etc.
+
+This chapter is a complete user guide of both activities,
+with common use cases of LTTng exposed throughout the text. It is
+assumed that you are familiar with LTTng's concepts (events, channels,
+domains, tracing sessions) and that you understand the roles of its
+components (daemons, libraries, command line tools); if not, we invite
+you to read the [Understanding LTTng](#doc-understanding-lttng) chapter
+before you begin reading this one.
+
+If you're new to LTTng, we suggest that you rather start with the
+[Getting started](#doc-getting-started) small guide first, then come
+back here to broaden your knowledge.
+
+If you're only interested in tracing the Linux kernel with its current
+instrumentation, you may skip the
+[Instrumenting](#doc-instrumenting) section.
--- /dev/null
+Contributor's guide
+===================
+
+This guide presents the structure and conventions of the LTTng
+Documentation's source. Make sure you read it thoroughly before
+contributing a change.
+
+
+structure
+---------
+
+`toc/docs.yml` is a YAML tree of all chapters, sections and subsections.
+It indicates which unique ID is linked to which position in the
+hierarchy and its true title.
+
+In the `contents` directory, the `preface.md` file is the preface contents.
+Each chapter has its own directory (directory names are not significant).
+Within those, `intro.md` files are partial introductions and then each
+section has its own directory, and so on, unless a section has no
+subsections, in which case all its contents is in a single Markdown file
+named _more or less_ like its ID.
+
+Each Markdown file begins with a YAML front matter which only contains
+the unique ID of this chapter/section:
+
+```yaml
+---
+id: unique-id-goes-here
+---
+
+First paragraph goes here.
+```
+
+Editable image sources are placed in `images/src` and their rendered
+equivalents are located in `images/export`.
+
+`tools/checkdocs.py` is a Python 3 script which may be used to find
+typical errors in the whole documentation (dead internal links,
+common grammar mistakes, etc.). It needs the
+[`termcolor`](https://pypi.python.org/pypi/termcolor) Python package.
+Run it from the repository's root:
+
+ tools/checkdocs.py
+
+and it will potentially output a list of errors and warnings.
+
+
+format of sources
+-----------------
+
+The sources are made of a fusion of Markdown and HTML processed by
+[kramdown](http://kramdown.gettalong.org/). Markdown is preferred,
+HTML being only used for specific cases that need special formatting
+not available using plain Markdown. The kramdown processor is clever
+enough to support both languages in the same file, even in the same
+paragraph!
+
+
+### HTML specifics
+
+Here's a list of HTML blocks and inline code used throughout the
+document. If you need to contribute, please use them when needed to
+preserve the document's visual consistency.
+
+
+#### tip/note block
+
+Tip/note block:
+
+```html
+<div class="tip">
+ <p>
+ <span class="t">Title goes here followed by colon:</span>Text goes
+ here; plain HTML.
+ </p>
+ <p>
+ Multiple paragraphs is allowed.
+ </p>
+</div>
+```
+
+Title should be `Tip:` for a tip and `Note:` for a note.
+
+
+#### external links
+
+Internal links should always use Markdown
+(`[caption](#doc-section)`). External links, however, need a special
+style and must use the `<a>` tag with the `ext` CSS class:
+
+```html
+The LTTng Documentation is
+<a href="https://github.com/lttng/lttng-docs" class="ext">public</a>.
+```
+
+
+#### abbreviations
+
+Use `<abbr>` for describing abbreviations. This should only be used
+for the first use of the abbreviation:
+
+```html
+The <abbr title="Linux Trace Toolkit: next generation">LTTng</abbr>
+project is an open source system software package [...]
+```
+
+
+#### non-breaking spaces
+
+Sometimes, a non-breaking space HTML entity (` `) needs to be
+explicitly written.
+
+Examples:
+
+```html
+The size of this file is 1039 bytes.
+
+This integer is displayed in base 16.
+
+A check is performed every 3000 ms.
+```
+
+
+#### placeholders in inline code
+
+You must use `<em>` to emphasize a placeholder within a `<code>` tag
+because Markdown backticks (<code>`</code>) always render their
+content literally:
+
+```html
+Name your file <code>something_<em>sys</em>.c</code>, where
+<code><em>sys</em></code> is your system name.
+```
+
+
+#### terminal boxes
+
+A terminal box, where command lines are shown, is a simple `<pre>`
+with the `term` class:
+
+```html
+<pre class="term">
+echo This is a terminal box
+</pre>
+```
+
+Do not prefix command lines with prompts (`$`/`#`) since this makes
+copy/paste operations painful.
+
+You may use `<strong>` tags to emphasize a part of the command line:
+
+```html
+<pre class="term">
+echo This is a <strong>terminal</strong> box
+</pre>
+```
+
+Results of commands, if needed, should be presented in a simple
+`text` kramdown code block:
+
+<pre>
+~~~ text
+[15:30:34.835895035] (+?.?????????) hostname hello_world: { cpu_id = 1 }, { my_int = 8, char0 = 68, char1 = 97, product = "DataTraveler 2.0" }
+[15:30:42.262781421] (+7.426886386) hostname hello_world: { cpu_id = 1 }, { my_int = 9, char0 = 80, char1 = 97, product = "Patriot Memory" }
+[15:30:48.175621778] (+5.912840357) hostname hello_world: { cpu_id = 1 }, { my_int = 10, char0 = 68, char1 = 97, product = "DataTraveler 2.0" }
+~~~
+</pre>
+
+
+#### images
+
+Use
+
+```html
+<div class="img img-70">
+ <img src="/images/docs/image-name.png" alt="Short description">
+</div>
+```
+
+to display an image. Change `img-70` to `img-` followed by the
+width percentage you wish.
+
+The SVG format is preferred. In this case, use the `<object>` tag to
+render an interactive SVG, with an inner raster image fallback for
+basic browsers:
+
+```html
+<div class="img img-90">
+ <object data="/images/docs/image-name.svg" type="image/svg+xml">
+ <img src="/images/docs/image-name.png" alt="Short description">
+ </object>
+</div>
+```
+
+An interactive SVG object allows its text to be selected, amongst other
+features.
+
+
+convention
+----------
+
+A few rules to comply with in order to keep the text as
+consistent as possible:
+
+ * Use _user space_, not _userspace_ nor _user-space_.
+ (neither _user land_).
+ * Use _file system_, not _filesystem_.
+ * Use _use case_, not _use-case_ nor _usecase_.
+ * Use _the C standard library_, not _libc_.
+ * Use _log level_, not _loglevel_.
+ * Use complete LTTng project names: _LTTng-modules_, _LTTng-UST_ and
+ _LTTng-tools_, not _modules_, _UST_ and _tools_.
+ * All code snippets should use 4 spaces for indentation (even C)
+ so that they are not too large.
+ * Prefer emphasis (Markdown: `_something_`, HTML: `<em>something</em>`)
+ to strong (Markdown: `**something**`, HTML: `<strong>something</strong>`)
+ for emphasizing text.
+ * Try to stay behind the 72th column mark if possible, and behind
+ the 80th column otherwise.
+ * Do not end directory paths with a forward slash
+ (good: `include/trace/events`, bad: `include/trace/events/`).
+ * Keep the text as impersonal as possible (minimize the use of
+ _I_, _we_, _us_, etc.), except for user guides/tutorials where
+ _we_ have an ongoing example.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="15cm" height="12cm" viewBox="619 -477 298 234" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g>
+ <rect style="fill: #c6ebff" x="625" y="-476" width="286" height="232"/>
+ <path style="fill: #c6ebff" d="M 625,-476 A 5,5 0 0 0 620,-471 L 625,-471 z"/>
+ <path style="fill: #c6ebff" d="M 916,-471 A 5,5 0 0 0 911,-476 L 911,-471 z"/>
+ <rect style="fill: #c6ebff" x="620" y="-471" width="296" height="222"/>
+ <path style="fill: #c6ebff" d="M 620,-249 A 5,5 0 0 0 625,-244 L 625,-249 z"/>
+ <path style="fill: #c6ebff" d="M 911,-244 A 5,5 0 0 0 916,-249 L 911,-249 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="625" y1="-476" x2="911" y2="-476"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="625" y1="-244" x2="911" y2="-244"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 625,-476 A 5,5 0 0 0 620,-471"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 916,-471 A 5,5 0 0 0 911,-476"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="620" y1="-471" x2="620" y2="-249"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="916" y1="-471" x2="916" y2="-249"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 620,-249 A 5,5 0 0 0 625,-244"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 911,-244 A 5,5 0 0 0 916,-249"/>
+ <text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="768" y="-356.1">
+ <tspan x="768" y="-356.1"></tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #fff3c6" x="633" y="-452" width="126" height="200"/>
+ <path style="fill: #fff3c6" d="M 633,-452 A 5,5 0 0 0 628,-447 L 633,-447 z"/>
+ <path style="fill: #fff3c6" d="M 764,-447 A 5,5 0 0 0 759,-452 L 759,-447 z"/>
+ <rect style="fill: #fff3c6" x="628" y="-447" width="136" height="190"/>
+ <path style="fill: #fff3c6" d="M 628,-257 A 5,5 0 0 0 633,-252 L 633,-257 z"/>
+ <path style="fill: #fff3c6" d="M 759,-252 A 5,5 0 0 0 764,-257 L 759,-257 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="633" y1="-452" x2="759" y2="-452"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="633" y1="-252" x2="759" y2="-252"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 633,-452 A 5,5 0 0 0 628,-447"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 764,-447 A 5,5 0 0 0 759,-452"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="628" y1="-447" x2="628" y2="-257"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="764" y1="-447" x2="764" y2="-257"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 628,-257 A 5,5 0 0 0 633,-252"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 759,-252 A 5,5 0 0 0 764,-257"/>
+ <text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="696" y="-348.1">
+ <tspan x="696" y="-348.1"></tspan>
+ </text>
+ </g>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:700" x="768" y="-460.875">
+ <tspan x="768" y="-460.875">Tracing session</tspan>
+ </text>
+ <g>
+ <rect style="fill: #ffffff" x="641" y="-428" width="110" height="80"/>
+ <path style="fill: #ffffff" d="M 641,-428 A 5,5 0 0 0 636,-423 L 641,-423 z"/>
+ <path style="fill: #ffffff" d="M 756,-423 A 5,5 0 0 0 751,-428 L 751,-423 z"/>
+ <rect style="fill: #ffffff" x="636" y="-423" width="120" height="70"/>
+ <path style="fill: #ffffff" d="M 636,-353 A 5,5 0 0 0 641,-348 L 641,-353 z"/>
+ <path style="fill: #ffffff" d="M 751,-348 A 5,5 0 0 0 756,-353 L 751,-353 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="641" y1="-428" x2="751" y2="-428"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="641" y1="-348" x2="751" y2="-348"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 641,-428 A 5,5 0 0 0 636,-423"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 756,-423 A 5,5 0 0 0 751,-428"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="636" y1="-423" x2="636" y2="-353"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="756" y1="-423" x2="756" y2="-353"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 636,-353 A 5,5 0 0 0 641,-348"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 751,-348 A 5,5 0 0 0 756,-353"/>
+ <text font-size="11.2887" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="696" y="-384.556">
+ <tspan x="696" y="-384.556"></tspan>
+ </text>
+ </g>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="696" y="-436.875">
+ <tspan x="696" y="-436.875">Linux kernel domain</tspan>
+ </text>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:italic;font-weight:normal" x="696" y="-412.875">
+ <tspan x="696" y="-412.875">Channel</tspan>
+ </text>
+ <g>
+ <rect style="fill: #ffffff" x="641" y="-340" width="110" height="80"/>
+ <path style="fill: #ffffff" d="M 641,-340 A 5,5 0 0 0 636,-335 L 641,-335 z"/>
+ <path style="fill: #ffffff" d="M 756,-335 A 5,5 0 0 0 751,-340 L 751,-335 z"/>
+ <rect style="fill: #ffffff" x="636" y="-335" width="120" height="70"/>
+ <path style="fill: #ffffff" d="M 636,-265 A 5,5 0 0 0 641,-260 L 641,-265 z"/>
+ <path style="fill: #ffffff" d="M 751,-260 A 5,5 0 0 0 756,-265 L 751,-265 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="641" y1="-340" x2="751" y2="-340"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="641" y1="-260" x2="751" y2="-260"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 641,-340 A 5,5 0 0 0 636,-335"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 756,-335 A 5,5 0 0 0 751,-340"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="636" y1="-335" x2="636" y2="-265"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="756" y1="-335" x2="756" y2="-265"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 636,-265 A 5,5 0 0 0 641,-260"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 751,-260 A 5,5 0 0 0 756,-265"/>
+ <text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="696" y="-296.1">
+ <tspan x="696" y="-296.1"></tspan>
+ </text>
+ </g>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:italic;font-weight:normal" x="696" y="-324.875">
+ <tspan x="696" y="-324.875">Channel</tspan>
+ </text>
+ <g>
+ <rect style="fill: #c7f4c7" x="649" y="-404" width="38" height="20"/>
+ <path style="fill: #c7f4c7" d="M 649,-404 A 5,5 0 0 0 644,-399 L 649,-399 z"/>
+ <path style="fill: #c7f4c7" d="M 692,-399 A 5,5 0 0 0 687,-404 L 687,-399 z"/>
+ <rect style="fill: #c7f4c7" x="644" y="-399" width="48" height="10"/>
+ <path style="fill: #c7f4c7" d="M 644,-389 A 5,5 0 0 0 649,-384 L 649,-389 z"/>
+ <path style="fill: #c7f4c7" d="M 687,-384 A 5,5 0 0 0 692,-389 L 687,-389 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="649" y1="-404" x2="687" y2="-404"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="649" y1="-384" x2="687" y2="-384"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 649,-404 A 5,5 0 0 0 644,-399"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 692,-399 A 5,5 0 0 0 687,-404"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="644" y1="-399" x2="644" y2="-389"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="692" y1="-399" x2="692" y2="-389"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 644,-389 A 5,5 0 0 0 649,-384"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 687,-384 A 5,5 0 0 0 692,-389"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="668" y="-391.244">
+ <tspan x="668" y="-391.244">Event A</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #e5e5e5" x="705" y="-404" width="38" height="20"/>
+ <path style="fill: #e5e5e5" d="M 705,-404 A 5,5 0 0 0 700,-399 L 705,-399 z"/>
+ <path style="fill: #e5e5e5" d="M 748,-399 A 5,5 0 0 0 743,-404 L 743,-399 z"/>
+ <rect style="fill: #e5e5e5" x="700" y="-399" width="48" height="10"/>
+ <path style="fill: #e5e5e5" d="M 700,-389 A 5,5 0 0 0 705,-384 L 705,-389 z"/>
+ <path style="fill: #e5e5e5" d="M 743,-384 A 5,5 0 0 0 748,-389 L 743,-389 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="705" y1="-404" x2="743" y2="-404"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="705" y1="-384" x2="743" y2="-384"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 705,-404 A 5,5 0 0 0 700,-399"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 748,-399 A 5,5 0 0 0 743,-404"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="700" y1="-399" x2="700" y2="-389"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="748" y1="-399" x2="748" y2="-389"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 700,-389 A 5,5 0 0 0 705,-384"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 743,-384 A 5,5 0 0 0 748,-389"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="724" y="-391.244">
+ <tspan x="724" y="-391.244">Event B</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c7f4c7" x="677" y="-376" width="38" height="20"/>
+ <path style="fill: #c7f4c7" d="M 677,-376 A 5,5 0 0 0 672,-371 L 677,-371 z"/>
+ <path style="fill: #c7f4c7" d="M 720,-371 A 5,5 0 0 0 715,-376 L 715,-371 z"/>
+ <rect style="fill: #c7f4c7" x="672" y="-371" width="48" height="10"/>
+ <path style="fill: #c7f4c7" d="M 672,-361 A 5,5 0 0 0 677,-356 L 677,-361 z"/>
+ <path style="fill: #c7f4c7" d="M 715,-356 A 5,5 0 0 0 720,-361 L 715,-361 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="677" y1="-376" x2="715" y2="-376"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="677" y1="-356" x2="715" y2="-356"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 677,-376 A 5,5 0 0 0 672,-371"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 720,-371 A 5,5 0 0 0 715,-376"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="672" y1="-371" x2="672" y2="-361"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="720" y1="-371" x2="720" y2="-361"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 672,-361 A 5,5 0 0 0 677,-356"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 715,-356 A 5,5 0 0 0 720,-361"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="696" y="-363.244">
+ <tspan x="696" y="-363.244">Event C</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #e5e5e5" x="705" y="-288" width="38" height="20"/>
+ <path style="fill: #e5e5e5" d="M 705,-288 A 5,5 0 0 0 700,-283 L 705,-283 z"/>
+ <path style="fill: #e5e5e5" d="M 748,-283 A 5,5 0 0 0 743,-288 L 743,-283 z"/>
+ <rect style="fill: #e5e5e5" x="700" y="-283" width="48" height="10"/>
+ <path style="fill: #e5e5e5" d="M 700,-273 A 5,5 0 0 0 705,-268 L 705,-273 z"/>
+ <path style="fill: #e5e5e5" d="M 743,-268 A 5,5 0 0 0 748,-273 L 743,-273 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="705" y1="-288" x2="743" y2="-288"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="705" y1="-268" x2="743" y2="-268"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 705,-288 A 5,5 0 0 0 700,-283"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 748,-283 A 5,5 0 0 0 743,-288"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="700" y1="-283" x2="700" y2="-273"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="748" y1="-283" x2="748" y2="-273"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 700,-273 A 5,5 0 0 0 705,-268"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 743,-268 A 5,5 0 0 0 748,-273"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="724" y="-275.244">
+ <tspan x="724" y="-275.244">Event E</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c7f4c7" x="649" y="-316" width="38" height="20"/>
+ <path style="fill: #c7f4c7" d="M 649,-316 A 5,5 0 0 0 644,-311 L 649,-311 z"/>
+ <path style="fill: #c7f4c7" d="M 692,-311 A 5,5 0 0 0 687,-316 L 687,-311 z"/>
+ <rect style="fill: #c7f4c7" x="644" y="-311" width="48" height="10"/>
+ <path style="fill: #c7f4c7" d="M 644,-301 A 5,5 0 0 0 649,-296 L 649,-301 z"/>
+ <path style="fill: #c7f4c7" d="M 687,-296 A 5,5 0 0 0 692,-301 L 687,-301 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="649" y1="-316" x2="687" y2="-316"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="649" y1="-296" x2="687" y2="-296"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 649,-316 A 5,5 0 0 0 644,-311"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 692,-311 A 5,5 0 0 0 687,-316"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="644" y1="-311" x2="644" y2="-301"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="692" y1="-311" x2="692" y2="-301"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 644,-301 A 5,5 0 0 0 649,-296"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 687,-296 A 5,5 0 0 0 692,-301"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="668" y="-303.244">
+ <tspan x="668" y="-303.244">Event B</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c7f4c7" x="705" y="-316" width="38" height="20"/>
+ <path style="fill: #c7f4c7" d="M 705,-316 A 5,5 0 0 0 700,-311 L 705,-311 z"/>
+ <path style="fill: #c7f4c7" d="M 748,-311 A 5,5 0 0 0 743,-316 L 743,-311 z"/>
+ <rect style="fill: #c7f4c7" x="700" y="-311" width="48" height="10"/>
+ <path style="fill: #c7f4c7" d="M 700,-301 A 5,5 0 0 0 705,-296 L 705,-301 z"/>
+ <path style="fill: #c7f4c7" d="M 743,-296 A 5,5 0 0 0 748,-301 L 743,-301 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="705" y1="-316" x2="743" y2="-316"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="705" y1="-296" x2="743" y2="-296"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 705,-316 A 5,5 0 0 0 700,-311"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 748,-311 A 5,5 0 0 0 743,-316"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="700" y1="-311" x2="700" y2="-301"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="748" y1="-311" x2="748" y2="-301"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 700,-301 A 5,5 0 0 0 705,-296"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 743,-296 A 5,5 0 0 0 748,-301"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="724" y="-303.244">
+ <tspan x="724" y="-303.244">Event C</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #e5e5e5" x="649" y="-288" width="38" height="20"/>
+ <path style="fill: #e5e5e5" d="M 649,-288 A 5,5 0 0 0 644,-283 L 649,-283 z"/>
+ <path style="fill: #e5e5e5" d="M 692,-283 A 5,5 0 0 0 687,-288 L 687,-283 z"/>
+ <rect style="fill: #e5e5e5" x="644" y="-283" width="48" height="10"/>
+ <path style="fill: #e5e5e5" d="M 644,-273 A 5,5 0 0 0 649,-268 L 649,-273 z"/>
+ <path style="fill: #e5e5e5" d="M 687,-268 A 5,5 0 0 0 692,-273 L 687,-273 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="649" y1="-288" x2="687" y2="-288"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="649" y1="-268" x2="687" y2="-268"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 649,-288 A 5,5 0 0 0 644,-283"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 692,-283 A 5,5 0 0 0 687,-288"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="644" y1="-283" x2="644" y2="-273"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="692" y1="-283" x2="692" y2="-273"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 644,-273 A 5,5 0 0 0 649,-268"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 687,-268 A 5,5 0 0 0 692,-273"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="668" y="-275.244">
+ <tspan x="668" y="-275.244">Event D</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #fff3c6" x="777" y="-452" width="126" height="200"/>
+ <path style="fill: #fff3c6" d="M 777,-452 A 5,5 0 0 0 772,-447 L 777,-447 z"/>
+ <path style="fill: #fff3c6" d="M 908,-447 A 5,5 0 0 0 903,-452 L 903,-447 z"/>
+ <rect style="fill: #fff3c6" x="772" y="-447" width="136" height="190"/>
+ <path style="fill: #fff3c6" d="M 772,-257 A 5,5 0 0 0 777,-252 L 777,-257 z"/>
+ <path style="fill: #fff3c6" d="M 903,-252 A 5,5 0 0 0 908,-257 L 903,-257 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="777" y1="-452" x2="903" y2="-452"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="777" y1="-252" x2="903" y2="-252"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 777,-452 A 5,5 0 0 0 772,-447"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 908,-447 A 5,5 0 0 0 903,-452"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="772" y1="-447" x2="772" y2="-257"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="908" y1="-447" x2="908" y2="-257"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 772,-257 A 5,5 0 0 0 777,-252"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 903,-252 A 5,5 0 0 0 908,-257"/>
+ <text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="840" y="-348.1">
+ <tspan x="840" y="-348.1"></tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff" x="785" y="-428" width="110" height="52"/>
+ <path style="fill: #ffffff" d="M 785,-428 A 5,5 0 0 0 780,-423 L 785,-423 z"/>
+ <path style="fill: #ffffff" d="M 900,-423 A 5,5 0 0 0 895,-428 L 895,-423 z"/>
+ <rect style="fill: #ffffff" x="780" y="-423" width="120" height="42"/>
+ <path style="fill: #ffffff" d="M 780,-381 A 5,5 0 0 0 785,-376 L 785,-381 z"/>
+ <path style="fill: #ffffff" d="M 895,-376 A 5,5 0 0 0 900,-381 L 895,-381 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="785" y1="-428" x2="895" y2="-428"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="785" y1="-376" x2="895" y2="-376"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 785,-428 A 5,5 0 0 0 780,-423"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 900,-423 A 5,5 0 0 0 895,-428"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="780" y1="-423" x2="780" y2="-381"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="900" y1="-423" x2="900" y2="-381"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 780,-381 A 5,5 0 0 0 785,-376"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 895,-376 A 5,5 0 0 0 900,-381"/>
+ <text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="840" y="-398.1">
+ <tspan x="840" y="-398.1"></tspan>
+ </text>
+ </g>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="840" y="-436.875">
+ <tspan x="840" y="-436.875">User space domain</tspan>
+ </text>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:italic;font-weight:normal" x="840" y="-412.875">
+ <tspan x="840" y="-412.875">Channel</tspan>
+ </text>
+ <g>
+ <rect style="fill: #ffffff" x="785" y="-368" width="110" height="108"/>
+ <path style="fill: #ffffff" d="M 785,-368 A 5,5 0 0 0 780,-363 L 785,-363 z"/>
+ <path style="fill: #ffffff" d="M 900,-363 A 5,5 0 0 0 895,-368 L 895,-363 z"/>
+ <rect style="fill: #ffffff" x="780" y="-363" width="120" height="98"/>
+ <path style="fill: #ffffff" d="M 780,-265 A 5,5 0 0 0 785,-260 L 785,-265 z"/>
+ <path style="fill: #ffffff" d="M 895,-260 A 5,5 0 0 0 900,-265 L 895,-265 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="785" y1="-368" x2="895" y2="-368"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="785" y1="-260" x2="895" y2="-260"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 785,-368 A 5,5 0 0 0 780,-363"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 900,-363 A 5,5 0 0 0 895,-368"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="780" y1="-363" x2="780" y2="-265"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="900" y1="-363" x2="900" y2="-265"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 780,-265 A 5,5 0 0 0 785,-260"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 895,-260 A 5,5 0 0 0 900,-265"/>
+ <text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="840" y="-310.1">
+ <tspan x="840" y="-310.1"></tspan>
+ </text>
+ </g>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:italic;font-weight:normal" x="840" y="-352.875">
+ <tspan x="840" y="-352.875">Channel</tspan>
+ </text>
+ <g>
+ <rect style="fill: #c7f4c7" x="849" y="-404" width="38" height="20"/>
+ <path style="fill: #c7f4c7" d="M 849,-404 A 5,5 0 0 0 844,-399 L 849,-399 z"/>
+ <path style="fill: #c7f4c7" d="M 892,-399 A 5,5 0 0 0 887,-404 L 887,-399 z"/>
+ <rect style="fill: #c7f4c7" x="844" y="-399" width="48" height="10"/>
+ <path style="fill: #c7f4c7" d="M 844,-389 A 5,5 0 0 0 849,-384 L 849,-389 z"/>
+ <path style="fill: #c7f4c7" d="M 887,-384 A 5,5 0 0 0 892,-389 L 887,-389 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="849" y1="-404" x2="887" y2="-404"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="849" y1="-384" x2="887" y2="-384"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 849,-404 A 5,5 0 0 0 844,-399"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 892,-399 A 5,5 0 0 0 887,-404"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="844" y1="-399" x2="844" y2="-389"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="892" y1="-399" x2="892" y2="-389"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 844,-389 A 5,5 0 0 0 849,-384"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 887,-384 A 5,5 0 0 0 892,-389"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="868" y="-391.244">
+ <tspan x="868" y="-391.244">Event 2</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #e5e5e5" x="793" y="-404" width="38" height="20"/>
+ <path style="fill: #e5e5e5" d="M 793,-404 A 5,5 0 0 0 788,-399 L 793,-399 z"/>
+ <path style="fill: #e5e5e5" d="M 836,-399 A 5,5 0 0 0 831,-404 L 831,-399 z"/>
+ <rect style="fill: #e5e5e5" x="788" y="-399" width="48" height="10"/>
+ <path style="fill: #e5e5e5" d="M 788,-389 A 5,5 0 0 0 793,-384 L 793,-389 z"/>
+ <path style="fill: #e5e5e5" d="M 831,-384 A 5,5 0 0 0 836,-389 L 831,-389 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="793" y1="-404" x2="831" y2="-404"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="793" y1="-384" x2="831" y2="-384"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 793,-404 A 5,5 0 0 0 788,-399"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 836,-399 A 5,5 0 0 0 831,-404"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="788" y1="-399" x2="788" y2="-389"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="836" y1="-399" x2="836" y2="-389"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 788,-389 A 5,5 0 0 0 793,-384"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 831,-384 A 5,5 0 0 0 836,-389"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="812" y="-391.244">
+ <tspan x="812" y="-391.244">Event 1</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c7f4c7" x="793" y="-344" width="38" height="20"/>
+ <path style="fill: #c7f4c7" d="M 793,-344 A 5,5 0 0 0 788,-339 L 793,-339 z"/>
+ <path style="fill: #c7f4c7" d="M 836,-339 A 5,5 0 0 0 831,-344 L 831,-339 z"/>
+ <rect style="fill: #c7f4c7" x="788" y="-339" width="48" height="10"/>
+ <path style="fill: #c7f4c7" d="M 788,-329 A 5,5 0 0 0 793,-324 L 793,-329 z"/>
+ <path style="fill: #c7f4c7" d="M 831,-324 A 5,5 0 0 0 836,-329 L 831,-329 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="793" y1="-344" x2="831" y2="-344"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="793" y1="-324" x2="831" y2="-324"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 793,-344 A 5,5 0 0 0 788,-339"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 836,-339 A 5,5 0 0 0 831,-344"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="788" y1="-339" x2="788" y2="-329"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="836" y1="-339" x2="836" y2="-329"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 788,-329 A 5,5 0 0 0 793,-324"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 831,-324 A 5,5 0 0 0 836,-329"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="812" y="-331.244">
+ <tspan x="812" y="-331.244">Event 2</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c7f4c7" x="849" y="-344" width="38" height="20"/>
+ <path style="fill: #c7f4c7" d="M 849,-344 A 5,5 0 0 0 844,-339 L 849,-339 z"/>
+ <path style="fill: #c7f4c7" d="M 892,-339 A 5,5 0 0 0 887,-344 L 887,-339 z"/>
+ <rect style="fill: #c7f4c7" x="844" y="-339" width="48" height="10"/>
+ <path style="fill: #c7f4c7" d="M 844,-329 A 5,5 0 0 0 849,-324 L 849,-329 z"/>
+ <path style="fill: #c7f4c7" d="M 887,-324 A 5,5 0 0 0 892,-329 L 887,-329 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="849" y1="-344" x2="887" y2="-344"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="849" y1="-324" x2="887" y2="-324"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 849,-344 A 5,5 0 0 0 844,-339"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 892,-339 A 5,5 0 0 0 887,-344"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="844" y1="-339" x2="844" y2="-329"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="892" y1="-339" x2="892" y2="-329"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 844,-329 A 5,5 0 0 0 849,-324"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 887,-324 A 5,5 0 0 0 892,-329"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="868" y="-331.244">
+ <tspan x="868" y="-331.244">Event 3</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #e5e5e5" x="793" y="-316" width="38" height="20"/>
+ <path style="fill: #e5e5e5" d="M 793,-316 A 5,5 0 0 0 788,-311 L 793,-311 z"/>
+ <path style="fill: #e5e5e5" d="M 836,-311 A 5,5 0 0 0 831,-316 L 831,-311 z"/>
+ <rect style="fill: #e5e5e5" x="788" y="-311" width="48" height="10"/>
+ <path style="fill: #e5e5e5" d="M 788,-301 A 5,5 0 0 0 793,-296 L 793,-301 z"/>
+ <path style="fill: #e5e5e5" d="M 831,-296 A 5,5 0 0 0 836,-301 L 831,-301 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="793" y1="-316" x2="831" y2="-316"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="793" y1="-296" x2="831" y2="-296"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 793,-316 A 5,5 0 0 0 788,-311"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 836,-311 A 5,5 0 0 0 831,-316"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="788" y1="-311" x2="788" y2="-301"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="836" y1="-311" x2="836" y2="-301"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 788,-301 A 5,5 0 0 0 793,-296"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 831,-296 A 5,5 0 0 0 836,-301"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="812" y="-303.244">
+ <tspan x="812" y="-303.244">Event 4</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #e5e5e5" x="821" y="-288" width="38" height="20"/>
+ <path style="fill: #e5e5e5" d="M 821,-288 A 5,5 0 0 0 816,-283 L 821,-283 z"/>
+ <path style="fill: #e5e5e5" d="M 864,-283 A 5,5 0 0 0 859,-288 L 859,-283 z"/>
+ <rect style="fill: #e5e5e5" x="816" y="-283" width="48" height="10"/>
+ <path style="fill: #e5e5e5" d="M 816,-273 A 5,5 0 0 0 821,-268 L 821,-273 z"/>
+ <path style="fill: #e5e5e5" d="M 859,-268 A 5,5 0 0 0 864,-273 L 859,-273 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="821" y1="-288" x2="859" y2="-288"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="821" y1="-268" x2="859" y2="-268"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 821,-288 A 5,5 0 0 0 816,-283"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 864,-283 A 5,5 0 0 0 859,-288"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="816" y1="-283" x2="816" y2="-273"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="864" y1="-283" x2="864" y2="-273"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 816,-273 A 5,5 0 0 0 821,-268"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 859,-268 A 5,5 0 0 0 864,-273"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="840" y="-275.244">
+ <tspan x="840" y="-275.244">Event 6</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c7f4c7" x="849" y="-316" width="38" height="20"/>
+ <path style="fill: #c7f4c7" d="M 849,-316 A 5,5 0 0 0 844,-311 L 849,-311 z"/>
+ <path style="fill: #c7f4c7" d="M 892,-311 A 5,5 0 0 0 887,-316 L 887,-311 z"/>
+ <rect style="fill: #c7f4c7" x="844" y="-311" width="48" height="10"/>
+ <path style="fill: #c7f4c7" d="M 844,-301 A 5,5 0 0 0 849,-296 L 849,-301 z"/>
+ <path style="fill: #c7f4c7" d="M 887,-296 A 5,5 0 0 0 892,-301 L 887,-301 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="849" y1="-316" x2="887" y2="-316"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="849" y1="-296" x2="887" y2="-296"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 849,-316 A 5,5 0 0 0 844,-311"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 892,-311 A 5,5 0 0 0 887,-316"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="844" y1="-311" x2="844" y2="-301"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" x1="892" y1="-311" x2="892" y2="-301"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 844,-301 A 5,5 0 0 0 849,-296"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 1.5; stroke: #000000" d="M 887,-296 A 5,5 0 0 0 892,-301"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="868" y="-303.244">
+ <tspan x="868" y="-303.244">Event 5</tspan>
+ </text>
+ </g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="18cm" height="9cm" viewBox="1208 -442 345 163" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g>
+ <rect style="fill: #c6ebff" x="1325" y="-440" width="110" height="80"/>
+ <path style="fill: #c6ebff" d="M 1325,-440 A 5,5 0 0 0 1320,-435 L 1325,-435 z"/>
+ <path style="fill: #c6ebff" d="M 1440,-435 A 5,5 0 0 0 1435,-440 L 1435,-435 z"/>
+ <rect style="fill: #c6ebff" x="1320" y="-435" width="120" height="70"/>
+ <path style="fill: #c6ebff" d="M 1320,-365 A 5,5 0 0 0 1325,-360 L 1325,-365 z"/>
+ <path style="fill: #c6ebff" d="M 1435,-360 A 5,5 0 0 0 1440,-365 L 1435,-365 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1325" y1="-440" x2="1435" y2="-440"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1325" y1="-360" x2="1435" y2="-360"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1325,-440 A 5,5 0 0 0 1320,-435"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1440,-435 A 5,5 0 0 0 1435,-440"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1320" y1="-435" x2="1320" y2="-365"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1440" y1="-435" x2="1440" y2="-365"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1320,-365 A 5,5 0 0 0 1325,-360"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1435,-360 A 5,5 0 0 0 1440,-365"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1380" y="-396.1">
+ <tspan x="1380" y="-396.1"></tspan>
+ </text>
+ </g>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1380" y="-424.875">
+ <tspan x="1380" y="-424.875">Relay daemon</tspan>
+ </text>
+ <g>
+ <rect style="fill: #c6ebff" x="1215" y="-424" width="52" height="36"/>
+ <path style="fill: #c6ebff" d="M 1215,-424 A 5,5 0 0 0 1210,-419 L 1215,-419 z"/>
+ <path style="fill: #c6ebff" d="M 1272,-419 A 5,5 0 0 0 1267,-424 L 1267,-419 z"/>
+ <rect style="fill: #c6ebff" x="1210" y="-419" width="62" height="26"/>
+ <path style="fill: #c6ebff" d="M 1210,-393 A 5,5 0 0 0 1215,-388 L 1215,-393 z"/>
+ <path style="fill: #c6ebff" d="M 1267,-388 A 5,5 0 0 0 1272,-393 L 1267,-393 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1215" y1="-424" x2="1267" y2="-424"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1215" y1="-388" x2="1267" y2="-388"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1215,-424 A 5,5 0 0 0 1210,-419"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1272,-419 A 5,5 0 0 0 1267,-424"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1210" y1="-419" x2="1210" y2="-393"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1272" y1="-419" x2="1272" y2="-393"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1210,-393 A 5,5 0 0 0 1215,-388"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1267,-388 A 5,5 0 0 0 1272,-393"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1241" y="-408.889">
+ <tspan x="1241" y="-408.889">Consumer</tspan>
+ <tspan x="1241" y="-397.6">daemon</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1272" y1="-406" x2="1340.26" y2="-406"/>
+ <polygon style="fill: #000000" points="1347.76,-406 1337.76,-401 1340.26,-406 1337.76,-411 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1347.76,-406 1337.76,-401 1340.26,-406 1337.76,-411 "/>
+ </g>
+ <text font-size="7.90222" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1296" y="-409.85">
+ <tspan x="1296" y="-409.85">Events</tspan>
+ </text>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1410" y1="-406" x2="1500.26" y2="-406"/>
+ <polygon style="fill: #000000" points="1507.76,-406 1497.76,-401 1500.26,-406 1497.76,-411 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1507.76,-406 1497.76,-401 1500.26,-406 1497.76,-411 "/>
+ </g>
+ <g>
+ <path style="fill: #ffffff" d="M 1510 -426.333 C 1518.57,-433.583 1522.86,-436 1531.42,-436 C 1540,-436 1544.28,-433.583 1552.85,-426.333 L 1552.85,-387.667 C 1544.28,-380.417 1540,-378 1531.42,-378 C 1522.86,-378 1518.57,-380.417 1510,-387.667 L 1510,-426.333z"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1510 -426.333 C 1518.57,-433.583 1522.86,-436 1531.42,-436 C 1540,-436 1544.28,-433.583 1552.85,-426.333 L 1552.85,-387.667 C 1544.28,-380.417 1540,-378 1531.42,-378 C 1522.86,-378 1518.57,-380.417 1510,-387.667 L 1510,-426.333"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1510 -426.333 C 1518.57,-419.083 1522.86,-416.667 1531.42,-416.667 C 1540,-416.667 1544.28,-419.083 1552.85,-426.333"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1531.42" y="-404.989">
+ <tspan x="1531.42" y="-404.989">CTF</tspan>
+ <tspan x="1531.42" y="-393.7">traces</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #b9e29e" x="1337" y="-308" width="86" height="28"/>
+ <path style="fill: #b9e29e" d="M 1337,-308 A 5,5 0 0 0 1332,-303 L 1337,-303 z"/>
+ <path style="fill: #b9e29e" d="M 1428,-303 A 5,5 0 0 0 1423,-308 L 1423,-303 z"/>
+ <rect style="fill: #b9e29e" x="1332" y="-303" width="96" height="18"/>
+ <path style="fill: #b9e29e" d="M 1332,-285 A 5,5 0 0 0 1337,-280 L 1337,-285 z"/>
+ <path style="fill: #b9e29e" d="M 1423,-280 A 5,5 0 0 0 1428,-285 L 1423,-285 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1337" y1="-308" x2="1423" y2="-308"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1337" y1="-280" x2="1423" y2="-280"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1337,-308 A 5,5 0 0 0 1332,-303"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1428,-303 A 5,5 0 0 0 1423,-308"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1332" y1="-303" x2="1332" y2="-285"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1428" y1="-303" x2="1428" y2="-285"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1332,-285 A 5,5 0 0 0 1337,-280"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1423,-280 A 5,5 0 0 0 1428,-285"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1380" y="-291.244">
+ <tspan x="1380" y="-291.244">Live viewer</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1380" y1="-376" x2="1380" y2="-317.736"/>
+ <polygon style="fill: #000000" points="1380,-310.236 1375,-320.236 1380,-317.736 1385,-320.236 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1380,-310.236 1375,-320.236 1380,-317.736 1385,-320.236 "/>
+ </g>
+ <g>
+ <polygon style="fill: #ffa529" points="1350,-416 1370,-416 1410,-416 1410,-396 1390,-396 1390,-376 1370,-376 1370,-396 1350,-396 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #ffa529" points="1350,-416 1370,-416 1410,-416 1410,-396 1390,-396 1390,-376 1370,-376 1370,-396 1350,-396 "/>
+ </g>
+ <g>
+ <rect style="fill: #ffffff" x="1335.65" y="-349.539" width="88.7" height="19.0778"/>
+ <text font-size="7.90222" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1380" y="-342.189">
+ <tspan x="1380" y="-342.189">Events over LTTng live</tspan>
+ <tspan x="1380" y="-332.311">(TCP)</tspan>
+ </text>
+ </g>
+ <text font-size="7.90222" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1296" y="-396.65">
+ <tspan x="1296" y="-396.65">(TCP)</tspan>
+ </text>
+ <text font-size="7.90222" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1470" y="-409.85">
+ <tspan x="1470" y="-409.85">CTF</tspan>
+ </text>
+ <text font-size="7.90222" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1470" y="-396.65">
+ <tspan x="1470" y="-396.65">(local FS)</tspan>
+ </text>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="21cm" height="23cm" viewBox="648 -462 405 443" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g>
+ <rect style="fill: #c6ebff" x="705" y="-460" width="110" height="40"/>
+ <path style="fill: #c6ebff" d="M 705,-460 A 5,5 0 0 0 700,-455 L 705,-455 z"/>
+ <path style="fill: #c6ebff" d="M 820,-455 A 5,5 0 0 0 815,-460 L 815,-455 z"/>
+ <rect style="fill: #c6ebff" x="700" y="-455" width="120" height="30"/>
+ <path style="fill: #c6ebff" d="M 700,-425 A 5,5 0 0 0 705,-420 L 705,-425 z"/>
+ <path style="fill: #c6ebff" d="M 815,-420 A 5,5 0 0 0 820,-425 L 815,-425 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="705" y1="-460" x2="815" y2="-460"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="705" y1="-420" x2="815" y2="-420"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 705,-460 A 5,5 0 0 0 700,-455"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 820,-455 A 5,5 0 0 0 815,-460"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="700" y1="-455" x2="700" y2="-425"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="820" y1="-455" x2="820" y2="-425"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 700,-425 A 5,5 0 0 0 705,-420"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 815,-420 A 5,5 0 0 0 820,-425"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="760" y="-436.1">
+ <tspan x="760" y="-436.1">hello-tp.tp</tspan>
+ </text>
+ </g>
+ <g>
+ <path style="fill: #ffe2e7" d="M 717.143 -380 L 802.857,-380 L 820,-360 L 802.857,-340 L 717.143,-340 L 700,-360 L 717.143,-380z"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 717.143 -380 L 802.857,-380 L 820,-360 L 802.857,-340 L 717.143,-340 L 700,-360 L 717.143,-380"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="760" y="-356">
+ <tspan x="760" y="-356">lttng-gen-tp</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="760" y1="-420" x2="760" y2="-389.736"/>
+ <polygon style="fill: #000000" points="760,-382.236 755,-392.236 760,-389.736 765,-392.236 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="760,-382.236 755,-392.236 760,-389.736 765,-392.236 "/>
+ </g>
+ <g>
+ <rect style="fill: #c9e8c9" x="655" y="-300" width="90" height="40"/>
+ <path style="fill: #c9e8c9" d="M 655,-300 A 5,5 0 0 0 650,-295 L 655,-295 z"/>
+ <path style="fill: #c9e8c9" d="M 750,-295 A 5,5 0 0 0 745,-300 L 745,-295 z"/>
+ <rect style="fill: #c9e8c9" x="650" y="-295" width="100" height="30"/>
+ <path style="fill: #c9e8c9" d="M 650,-265 A 5,5 0 0 0 655,-260 L 655,-265 z"/>
+ <path style="fill: #c9e8c9" d="M 745,-260 A 5,5 0 0 0 750,-265 L 745,-265 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="655" y1="-300" x2="745" y2="-300"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="655" y1="-260" x2="745" y2="-260"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 655,-300 A 5,5 0 0 0 650,-295"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 750,-295 A 5,5 0 0 0 745,-300"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="650" y1="-295" x2="650" y2="-265"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="750" y1="-295" x2="750" y2="-265"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 650,-265 A 5,5 0 0 0 655,-260"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 745,-260 A 5,5 0 0 0 750,-265"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="700" y="-276.1">
+ <tspan x="700" y="-276.1">hello-tp.o</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c9e8c9" x="775" y="-300" width="90" height="40"/>
+ <path style="fill: #c9e8c9" d="M 775,-300 A 5,5 0 0 0 770,-295 L 775,-295 z"/>
+ <path style="fill: #c9e8c9" d="M 870,-295 A 5,5 0 0 0 865,-300 L 865,-295 z"/>
+ <rect style="fill: #c9e8c9" x="770" y="-295" width="100" height="30"/>
+ <path style="fill: #c9e8c9" d="M 770,-265 A 5,5 0 0 0 775,-260 L 775,-265 z"/>
+ <path style="fill: #c9e8c9" d="M 865,-260 A 5,5 0 0 0 870,-265 L 865,-265 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="775" y1="-300" x2="865" y2="-300"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="775" y1="-260" x2="865" y2="-260"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 775,-300 A 5,5 0 0 0 770,-295"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 870,-295 A 5,5 0 0 0 865,-300"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="770" y1="-295" x2="770" y2="-265"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="870" y1="-295" x2="870" y2="-265"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 770,-265 A 5,5 0 0 0 775,-260"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 865,-260 A 5,5 0 0 0 870,-265"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="820" y="-276.1">
+ <tspan x="820" y="-276.1">hello-tp.h</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="738.572" y1="-340" x2="706.758" y2="-307.008"/>
+ <polygon style="fill: #000000" points="701.552,-301.61 704.894,-312.279 706.758,-307.008 712.093,-305.337 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="701.552,-301.61 704.894,-312.279 706.758,-307.008 712.093,-305.337 "/>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="781.428" y1="-340" x2="813.242" y2="-307.008"/>
+ <polygon style="fill: #000000" points="818.448,-301.61 807.907,-305.337 813.242,-307.008 815.106,-312.279 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="818.448,-301.61 807.907,-305.337 813.242,-307.008 815.106,-312.279 "/>
+ </g>
+ <g>
+ <rect style="fill: #c6ebff" x="775" y="-220" width="90" height="40"/>
+ <path style="fill: #c6ebff" d="M 775,-220 A 5,5 0 0 0 770,-215 L 775,-215 z"/>
+ <path style="fill: #c6ebff" d="M 870,-215 A 5,5 0 0 0 865,-220 L 865,-215 z"/>
+ <rect style="fill: #c6ebff" x="770" y="-215" width="100" height="30"/>
+ <path style="fill: #c6ebff" d="M 770,-185 A 5,5 0 0 0 775,-180 L 775,-185 z"/>
+ <path style="fill: #c6ebff" d="M 865,-180 A 5,5 0 0 0 870,-185 L 865,-185 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="775" y1="-220" x2="865" y2="-220"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="775" y1="-180" x2="865" y2="-180"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 775,-220 A 5,5 0 0 0 770,-215"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 870,-215 A 5,5 0 0 0 865,-220"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="770" y1="-215" x2="770" y2="-185"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="870" y1="-215" x2="870" y2="-185"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 770,-185 A 5,5 0 0 0 775,-180"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 865,-180 A 5,5 0 0 0 870,-185"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="820" y="-196.1">
+ <tspan x="820" y="-196.1">hello.c</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="820" y1="-220" x2="820" y2="-255.528"/>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="825,-247.764 820,-257.764 815,-247.764 "/>
+ </g>
+ <g>
+ <rect style="fill: #ffffff" x="799.8" y="-239.479" width="40.4" height="10.55"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="820" y="-231.079">
+ <tspan x="820" y="-231.079">#include</tspan>
+ </text>
+ </g>
+ <g>
+ <path style="fill: #ffe2e7" d="M 717.143 -140 L 802.857,-140 L 820,-120 L 802.857,-100 L 717.143,-100 L 700,-120 L 717.143,-140z"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 717.143 -140 L 802.857,-140 L 820,-120 L 802.857,-100 L 717.143,-100 L 700,-120 L 717.143,-140"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="760" y="-116">
+ <tspan x="760" y="-116">gcc/clang</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="700" y1="-260" x2="735.593" y2="-149.269"/>
+ <polygon style="fill: #000000" points="737.888,-142.129 730.067,-150.119 735.593,-149.269 739.588,-153.179 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="737.888,-142.129 730.067,-150.119 735.593,-149.269 739.588,-153.179 "/>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="820" y1="-180" x2="788.186" y2="-147.008"/>
+ <polygon style="fill: #000000" points="782.98,-141.61 786.322,-152.279 788.186,-147.008 793.521,-145.337 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="782.98,-141.61 786.322,-152.279 788.186,-147.008 793.521,-145.337 "/>
+ </g>
+ <g>
+ <rect style="fill: #c9e8c9" x="705" y="-60" width="110" height="40"/>
+ <path style="fill: #c9e8c9" d="M 705,-60 A 5,5 0 0 0 700,-55 L 705,-55 z"/>
+ <path style="fill: #c9e8c9" d="M 820,-55 A 5,5 0 0 0 815,-60 L 815,-55 z"/>
+ <rect style="fill: #c9e8c9" x="700" y="-55" width="120" height="30"/>
+ <path style="fill: #c9e8c9" d="M 700,-25 A 5,5 0 0 0 705,-20 L 705,-25 z"/>
+ <path style="fill: #c9e8c9" d="M 815,-20 A 5,5 0 0 0 820,-25 L 815,-25 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="705" y1="-60" x2="815" y2="-60"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="705" y1="-20" x2="815" y2="-20"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 705,-60 A 5,5 0 0 0 700,-55"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 820,-55 A 5,5 0 0 0 815,-60"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="700" y1="-55" x2="700" y2="-25"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="820" y1="-55" x2="820" y2="-25"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 700,-25 A 5,5 0 0 0 705,-20"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 815,-20 A 5,5 0 0 0 820,-25"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="760" y="-36.1">
+ <tspan x="760" y="-36.1">hello</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="760" y1="-100" x2="760" y2="-69.7361"/>
+ <polygon style="fill: #000000" points="760,-62.2361 755,-72.2361 760,-69.7361 765,-72.2361 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="760,-62.2361 755,-72.2361 760,-69.7361 765,-72.2361 "/>
+ </g>
+ <g>
+ <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #bfbfbf" x="890" y="-460" width="162" height="84"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="971" y="-414.1">
+ <tspan x="971" y="-414.1"></tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c6ebff" x="902" y="-448" width="20" height="12"/>
+ <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="902" y="-448" width="20" height="12"/>
+ <text font-size="1.6" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="912" y="-441.5">
+ <tspan x="912" y="-441.5"></tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c9e8c9" x="902" y="-424" width="20" height="12"/>
+ <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="902" y="-424" width="20" height="12"/>
+ <text font-size="1.6" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="912" y="-417.5">
+ <tspan x="912" y="-417.5"></tspan>
+ </text>
+ </g>
+ <text font-size="11.2889" style="fill: #000000;text-anchor:start;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="934" y="-438.075">
+ <tspan x="934" y="-438.075">File written by user</tspan>
+ </text>
+ <text font-size="11.2889" style="fill: #000000;text-anchor:start;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="934" y="-414.075">
+ <tspan x="934" y="-414.075">Generated file</tspan>
+ </text>
+ <text font-size="11.2889" style="fill: #000000;text-anchor:start;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="934" y="-390.075">
+ <tspan x="934" y="-390.075">Tool</tspan>
+ </text>
+ <g>
+ <path style="fill: #ffe2e7" d="M 904.857 -400 L 919.143,-400 L 922,-394 L 919.143,-388 L 904.857,-388 L 902,-394 L 904.857,-400z"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 904.857 -400 L 919.143,-400 L 922,-394 L 919.143,-388 L 904.857,-388 L 902,-394 L 904.857,-400"/>
+ <text font-size="1.6" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="912" y="-393.5">
+ <tspan x="912" y="-393.5"></tspan>
+ </text>
+ </g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="20cm" height="28cm" viewBox="878 -642 384 553" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g>
+ <rect style="fill: #f0f0f0" x="885" y="-640" width="370" height="410"/>
+ <path style="fill: #f0f0f0" d="M 885,-640 A 5,5 0 0 0 880,-635 L 885,-635 z"/>
+ <path style="fill: #f0f0f0" d="M 1260,-635 A 5,5 0 0 0 1255,-640 L 1255,-635 z"/>
+ <rect style="fill: #f0f0f0" x="880" y="-635" width="380" height="400"/>
+ <path style="fill: #f0f0f0" d="M 880,-235 A 5,5 0 0 0 885,-230 L 885,-235 z"/>
+ <path style="fill: #f0f0f0" d="M 1255,-230 A 5,5 0 0 0 1260,-235 L 1255,-235 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="885" y1="-640" x2="1255" y2="-640"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="885" y1="-230" x2="1255" y2="-230"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 885,-640 A 5,5 0 0 0 880,-635"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1260,-635 A 5,5 0 0 0 1255,-640"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="880" y1="-635" x2="880" y2="-235"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1260" y1="-635" x2="1260" y2="-235"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 880,-235 A 5,5 0 0 0 885,-230"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1255,-230 A 5,5 0 0 0 1260,-235"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1070" y="-431.1">
+ <tspan x="1070" y="-431.1"></tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #f0f0f0" x="915" y="-210" width="230" height="120"/>
+ <path style="fill: #f0f0f0" d="M 915,-210 A 5,5 0 0 0 910,-205 L 915,-205 z"/>
+ <path style="fill: #f0f0f0" d="M 1150,-205 A 5,5 0 0 0 1145,-210 L 1145,-205 z"/>
+ <rect style="fill: #f0f0f0" x="910" y="-205" width="240" height="110"/>
+ <path style="fill: #f0f0f0" d="M 910,-95 A 5,5 0 0 0 915,-90 L 915,-95 z"/>
+ <path style="fill: #f0f0f0" d="M 1145,-90 A 5,5 0 0 0 1150,-95 L 1145,-95 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="915" y1="-210" x2="1145" y2="-210"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="915" y1="-90" x2="1145" y2="-90"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 915,-210 A 5,5 0 0 0 910,-205"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1150,-205 A 5,5 0 0 0 1145,-210"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="910" y1="-205" x2="910" y2="-95"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1150" y1="-205" x2="1150" y2="-95"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 910,-95 A 5,5 0 0 0 915,-90"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1145,-90 A 5,5 0 0 0 1150,-95"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1030" y="-146.1">
+ <tspan x="1030" y="-146.1"></tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #fff3c6" x="895" y="-600" width="90" height="60"/>
+ <path style="fill: #fff3c6" d="M 895,-600 A 5,5 0 0 0 890,-595 L 895,-595 z"/>
+ <path style="fill: #fff3c6" d="M 990,-595 A 5,5 0 0 0 985,-600 L 985,-595 z"/>
+ <rect style="fill: #fff3c6" x="890" y="-595" width="100" height="50"/>
+ <path style="fill: #fff3c6" d="M 890,-545 A 5,5 0 0 0 895,-540 L 895,-545 z"/>
+ <path style="fill: #fff3c6" d="M 985,-540 A 5,5 0 0 0 990,-545 L 985,-545 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="895" y1="-600" x2="985" y2="-600"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="895" y1="-540" x2="985" y2="-540"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 895,-600 A 5,5 0 0 0 890,-595"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 990,-595 A 5,5 0 0 0 985,-600"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="890" y1="-595" x2="890" y2="-545"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="990" y1="-595" x2="990" y2="-545"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 890,-545 A 5,5 0 0 0 895,-540"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 985,-540 A 5,5 0 0 0 990,-545"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="940" y="-566.1">
+ <tspan x="940" y="-566.1"></tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffbf6a" x="905" y="-580" width="70" height="30"/>
+ <path style="fill: #ffbf6a" d="M 905,-580 A 5,5 0 0 0 900,-575 L 905,-575 z"/>
+ <path style="fill: #ffbf6a" d="M 980,-575 A 5,5 0 0 0 975,-580 L 975,-575 z"/>
+ <rect style="fill: #ffbf6a" x="900" y="-575" width="80" height="20"/>
+ <path style="fill: #ffbf6a" d="M 900,-555 A 5,5 0 0 0 905,-550 L 905,-555 z"/>
+ <path style="fill: #ffbf6a" d="M 975,-550 A 5,5 0 0 0 980,-555 L 975,-555 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="905" y1="-580" x2="975" y2="-580"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="905" y1="-550" x2="975" y2="-550"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 905,-580 A 5,5 0 0 0 900,-575"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 980,-575 A 5,5 0 0 0 975,-580"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="900" y1="-575" x2="900" y2="-555"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="980" y1="-575" x2="980" y2="-555"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 900,-555 A 5,5 0 0 0 905,-550"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 975,-550 A 5,5 0 0 0 980,-555"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="940" y="-562.244">
+ <tspan x="940" y="-562.244">TP</tspan>
+ </text>
+ </g>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="940" y="-587.007">
+ <tspan x="940" y="-587.007">C/C++ application</tspan>
+ </text>
+ <g>
+ <rect style="fill: #d2edd2" x="895" y="-530" width="90" height="30"/>
+ <path style="fill: #d2edd2" d="M 895,-530 A 5,5 0 0 0 890,-525 L 895,-525 z"/>
+ <path style="fill: #d2edd2" d="M 990,-525 A 5,5 0 0 0 985,-530 L 985,-525 z"/>
+ <rect style="fill: #d2edd2" x="890" y="-525" width="100" height="20"/>
+ <path style="fill: #d2edd2" d="M 890,-505 A 5,5 0 0 0 895,-500 L 895,-505 z"/>
+ <path style="fill: #d2edd2" d="M 985,-500 A 5,5 0 0 0 990,-505 L 985,-505 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="895" y1="-530" x2="985" y2="-530"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="895" y1="-500" x2="985" y2="-500"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 895,-530 A 5,5 0 0 0 890,-525"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 990,-525 A 5,5 0 0 0 985,-530"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="890" y1="-525" x2="890" y2="-505"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="990" y1="-525" x2="990" y2="-505"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 890,-505 A 5,5 0 0 0 895,-500"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 985,-500 A 5,5 0 0 0 990,-505"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="940" y="-512.244">
+ <tspan x="940" y="-512.244">liblttng-ust</tspan>
+ </text>
+ </g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="940" y1="-540" x2="940" y2="-530"/>
+ <g>
+ <rect style="fill: #fff3c6" x="1015" y="-600" width="90" height="30"/>
+ <path style="fill: #fff3c6" d="M 1015,-600 A 5,5 0 0 0 1010,-595 L 1015,-595 z"/>
+ <path style="fill: #fff3c6" d="M 1110,-595 A 5,5 0 0 0 1105,-600 L 1105,-595 z"/>
+ <rect style="fill: #fff3c6" x="1010" y="-595" width="100" height="20"/>
+ <path style="fill: #fff3c6" d="M 1010,-575 A 5,5 0 0 0 1015,-570 L 1015,-575 z"/>
+ <path style="fill: #fff3c6" d="M 1105,-570 A 5,5 0 0 0 1110,-575 L 1105,-575 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-600" x2="1105" y2="-600"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-570" x2="1105" y2="-570"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1015,-600 A 5,5 0 0 0 1010,-595"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1110,-595 A 5,5 0 0 0 1105,-600"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1010" y1="-595" x2="1010" y2="-575"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1110" y1="-595" x2="1110" y2="-575"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1010,-575 A 5,5 0 0 0 1015,-570"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1105,-570 A 5,5 0 0 0 1110,-575"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1060" y="-582.244">
+ <tspan x="1060" y="-582.244">Java application</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #d2edd2" x="1015" y="-480" width="90" height="30"/>
+ <path style="fill: #d2edd2" d="M 1015,-480 A 5,5 0 0 0 1010,-475 L 1015,-475 z"/>
+ <path style="fill: #d2edd2" d="M 1110,-475 A 5,5 0 0 0 1105,-480 L 1105,-475 z"/>
+ <rect style="fill: #d2edd2" x="1010" y="-475" width="100" height="20"/>
+ <path style="fill: #d2edd2" d="M 1010,-455 A 5,5 0 0 0 1015,-450 L 1015,-455 z"/>
+ <path style="fill: #d2edd2" d="M 1105,-450 A 5,5 0 0 0 1110,-455 L 1105,-455 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-480" x2="1105" y2="-480"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-450" x2="1105" y2="-450"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1015,-480 A 5,5 0 0 0 1010,-475"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1110,-475 A 5,5 0 0 0 1105,-480"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1010" y1="-475" x2="1010" y2="-455"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1110" y1="-475" x2="1110" y2="-455"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1010,-455 A 5,5 0 0 0 1015,-450"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1105,-450 A 5,5 0 0 0 1110,-455"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1060" y="-462.244">
+ <tspan x="1060" y="-462.244">liblttng-ust</tspan>
+ </text>
+ </g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1060" y1="-490" x2="1060" y2="-480"/>
+ <g>
+ <rect style="fill: #d2edd2" x="1015" y="-520" width="90" height="30"/>
+ <path style="fill: #d2edd2" d="M 1015,-520 A 5,5 0 0 0 1010,-515 L 1015,-515 z"/>
+ <path style="fill: #d2edd2" d="M 1110,-515 A 5,5 0 0 0 1105,-520 L 1105,-515 z"/>
+ <rect style="fill: #d2edd2" x="1010" y="-515" width="100" height="20"/>
+ <path style="fill: #d2edd2" d="M 1010,-495 A 5,5 0 0 0 1015,-490 L 1015,-495 z"/>
+ <path style="fill: #d2edd2" d="M 1105,-490 A 5,5 0 0 0 1110,-495 L 1105,-495 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-520" x2="1105" y2="-520"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-490" x2="1105" y2="-490"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1015,-520 A 5,5 0 0 0 1010,-515"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1110,-515 A 5,5 0 0 0 1105,-520"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1010" y1="-515" x2="1010" y2="-495"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1110" y1="-515" x2="1110" y2="-495"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1010,-495 A 5,5 0 0 0 1015,-490"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1105,-490 A 5,5 0 0 0 1110,-495"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1060" y="-502.244">
+ <tspan x="1060" y="-502.244">liblttng-ust-jul-jni</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #cecece" x="1015" y="-560" width="90" height="30"/>
+ <path style="fill: #cecece" d="M 1015,-560 A 5,5 0 0 0 1010,-555 L 1015,-555 z"/>
+ <path style="fill: #cecece" d="M 1110,-555 A 5,5 0 0 0 1105,-560 L 1105,-555 z"/>
+ <rect style="fill: #cecece" x="1010" y="-555" width="100" height="20"/>
+ <path style="fill: #cecece" d="M 1010,-535 A 5,5 0 0 0 1015,-530 L 1015,-535 z"/>
+ <path style="fill: #cecece" d="M 1105,-530 A 5,5 0 0 0 1110,-535 L 1105,-535 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-560" x2="1105" y2="-560"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-530" x2="1105" y2="-530"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1015,-560 A 5,5 0 0 0 1010,-555"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1110,-555 A 5,5 0 0 0 1105,-560"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1010" y1="-555" x2="1010" y2="-535"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1110" y1="-555" x2="1110" y2="-535"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1010,-535 A 5,5 0 0 0 1015,-530"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1105,-530 A 5,5 0 0 0 1110,-535"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1060" y="-542.244">
+ <tspan x="1060" y="-542.244">liblttng-ust-jul.jar</tspan>
+ </text>
+ </g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1060" y1="-530" x2="1060" y2="-520"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1060" y1="-570" x2="1060" y2="-560"/>
+ <g>
+ <rect style="fill: #fff3c6" x="1155" y="-600" width="90" height="76"/>
+ <path style="fill: #fff3c6" d="M 1155,-600 A 5,5 0 0 0 1150,-595 L 1155,-595 z"/>
+ <path style="fill: #fff3c6" d="M 1250,-595 A 5,5 0 0 0 1245,-600 L 1245,-595 z"/>
+ <rect style="fill: #fff3c6" x="1150" y="-595" width="100" height="66"/>
+ <path style="fill: #fff3c6" d="M 1150,-529 A 5,5 0 0 0 1155,-524 L 1155,-529 z"/>
+ <path style="fill: #fff3c6" d="M 1245,-524 A 5,5 0 0 0 1250,-529 L 1245,-529 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1155" y1="-600" x2="1245" y2="-600"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1155" y1="-524" x2="1245" y2="-524"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1155,-600 A 5,5 0 0 0 1150,-595"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1250,-595 A 5,5 0 0 0 1245,-600"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1150" y1="-595" x2="1150" y2="-529"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1250" y1="-595" x2="1250" y2="-529"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1150,-529 A 5,5 0 0 0 1155,-524"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1245,-524 A 5,5 0 0 0 1250,-529"/>
+ <text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1200" y="-558.1">
+ <tspan x="1200" y="-558.1"></tspan>
+ </text>
+ </g>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1200" y="-584.875">
+ <tspan x="1200" y="-584.875">Linux kernel</tspan>
+ </text>
+ <g>
+ <rect style="fill: #ac3a3b" x="1165" y="-576" width="70" height="30"/>
+ <path style="fill: #ac3a3b" d="M 1165,-576 A 5,5 0 0 0 1160,-571 L 1165,-571 z"/>
+ <path style="fill: #ac3a3b" d="M 1240,-571 A 5,5 0 0 0 1235,-576 L 1235,-571 z"/>
+ <rect style="fill: #ac3a3b" x="1160" y="-571" width="80" height="20"/>
+ <path style="fill: #ac3a3b" d="M 1160,-551 A 5,5 0 0 0 1165,-546 L 1165,-551 z"/>
+ <path style="fill: #ac3a3b" d="M 1235,-546 A 5,5 0 0 0 1240,-551 L 1235,-551 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1165" y1="-576" x2="1235" y2="-576"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1165" y1="-546" x2="1235" y2="-546"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1165,-576 A 5,5 0 0 0 1160,-571"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1240,-571 A 5,5 0 0 0 1235,-576"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1160" y1="-571" x2="1160" y2="-551"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1240" y1="-571" x2="1240" y2="-551"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1160,-551 A 5,5 0 0 0 1165,-546"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1235,-546 A 5,5 0 0 0 1240,-551"/>
+ <text font-size="9.03111" style="fill: #ffffff;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1200" y="-558.244">
+ <tspan x="1200" y="-558.244">LTTng modules</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #c6ebff" x="1015" y="-410" width="90" height="30"/>
+ <path style="fill: #c6ebff" d="M 1015,-410 A 5,5 0 0 0 1010,-405 L 1015,-405 z"/>
+ <path style="fill: #c6ebff" d="M 1110,-405 A 5,5 0 0 0 1105,-410 L 1105,-405 z"/>
+ <rect style="fill: #c6ebff" x="1010" y="-405" width="100" height="20"/>
+ <path style="fill: #c6ebff" d="M 1010,-385 A 5,5 0 0 0 1015,-380 L 1015,-385 z"/>
+ <path style="fill: #c6ebff" d="M 1105,-380 A 5,5 0 0 0 1110,-385 L 1105,-385 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-410" x2="1105" y2="-410"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-380" x2="1105" y2="-380"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1015,-410 A 5,5 0 0 0 1010,-405"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1110,-405 A 5,5 0 0 0 1105,-410"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1010" y1="-405" x2="1010" y2="-385"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1110" y1="-405" x2="1110" y2="-385"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1010,-385 A 5,5 0 0 0 1015,-380"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1105,-380 A 5,5 0 0 0 1110,-385"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1060" y="-392.244">
+ <tspan x="1060" y="-392.244">lttng-sessiond</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #eb595e" x1="1060" y1="-441.764" x2="1060" y2="-418.236"/>
+ <polygon style="fill: #eb595e" points="1060,-447.764 1064,-439.764 1060,-441.764 1056,-439.764 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1060,-447.764 1064,-439.764 1060,-441.764 1056,-439.764 "/>
+ <polygon style="fill: #eb595e" points="1060,-412.236 1056,-420.236 1060,-418.236 1064,-420.236 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1060,-412.236 1056,-420.236 1060,-418.236 1064,-420.236 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #eb595e" points="965,-491.764 965,-432 1035,-432 1035,-418.236 "/>
+ <polygon style="fill: #eb595e" points="965,-497.764 969,-489.764 965,-491.764 961,-489.764 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="965,-497.764 969,-489.764 965,-491.764 961,-489.764 "/>
+ <polygon style="fill: #eb595e" points="1035,-412.236 1031,-420.236 1035,-418.236 1039,-420.236 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1035,-412.236 1031,-420.236 1035,-418.236 1039,-420.236 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #eb595e" points="1180,-537.764 1180,-402.5 1118.24,-402.5 "/>
+ <polygon style="fill: #eb595e" points="1180,-543.764 1184,-535.764 1180,-537.764 1176,-535.764 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1180,-543.764 1184,-535.764 1180,-537.764 1176,-535.764 "/>
+ <polygon style="fill: #eb595e" points="1112.24,-402.5 1120.24,-406.5 1118.24,-402.5 1120.24,-398.5 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1112.24,-402.5 1120.24,-406.5 1118.24,-402.5 1120.24,-398.5 "/>
+ </g>
+ <g>
+ <rect style="fill: #c6ebff" x="1015" y="-348" width="90" height="30"/>
+ <path style="fill: #c6ebff" d="M 1015,-348 A 5,5 0 0 0 1010,-343 L 1015,-343 z"/>
+ <path style="fill: #c6ebff" d="M 1110,-343 A 5,5 0 0 0 1105,-348 L 1105,-343 z"/>
+ <rect style="fill: #c6ebff" x="1010" y="-343" width="100" height="20"/>
+ <path style="fill: #c6ebff" d="M 1010,-323 A 5,5 0 0 0 1015,-318 L 1015,-323 z"/>
+ <path style="fill: #c6ebff" d="M 1105,-318 A 5,5 0 0 0 1110,-323 L 1105,-323 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-348" x2="1105" y2="-348"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-318" x2="1105" y2="-318"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1015,-348 A 5,5 0 0 0 1010,-343"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1110,-343 A 5,5 0 0 0 1105,-348"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1010" y1="-343" x2="1010" y2="-323"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1110" y1="-343" x2="1110" y2="-323"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1010,-323 A 5,5 0 0 0 1015,-318"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1105,-318 A 5,5 0 0 0 1110,-323"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1060" y="-330.244">
+ <tspan x="1060" y="-330.244">lttng-consumerd</tspan>
+ </text>
+ </g>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1010,-465 984,-465 984,-340.5 1001.76,-340.5 "/>
+ <polygon style="fill: #000000" points="1007.76,-340.5 999.764,-336.5 1001.76,-340.5 999.764,-344.5 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1007.76,-340.5 999.764,-336.5 1001.76,-340.5 999.764,-344.5 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="940,-500 940,-500 940,-325.5 1001.76,-325.5 "/>
+ <polygon style="fill: #000000" points="1007.76,-325.5 999.764,-321.5 1001.76,-325.5 999.764,-329.5 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1007.76,-325.5 999.764,-321.5 1001.76,-325.5 999.764,-329.5 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1200,-546 1200,-333 1118.24,-333 "/>
+ <polygon style="fill: #000000" points="1112.24,-333 1120.24,-337 1118.24,-333 1120.24,-329 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1112.24,-333 1120.24,-337 1118.24,-333 1120.24,-329 "/>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #eb595e" x1="1060" y1="-371.764" x2="1060" y2="-356.236"/>
+ <polygon style="fill: #eb595e" points="1060,-377.764 1064,-369.764 1060,-371.764 1056,-369.764 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1060,-377.764 1064,-369.764 1060,-371.764 1056,-369.764 "/>
+ <polygon style="fill: #eb595e" points="1060,-350.236 1056,-358.236 1060,-356.236 1064,-358.236 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1060,-350.236 1056,-358.236 1060,-356.236 1064,-358.236 "/>
+ </g>
+ <g>
+ <rect style="fill: #c6ebff" x="1185" y="-270" width="60" height="30"/>
+ <path style="fill: #c6ebff" d="M 1185,-270 A 5,5 0 0 0 1180,-265 L 1185,-265 z"/>
+ <path style="fill: #c6ebff" d="M 1250,-265 A 5,5 0 0 0 1245,-270 L 1245,-265 z"/>
+ <rect style="fill: #c6ebff" x="1180" y="-265" width="70" height="20"/>
+ <path style="fill: #c6ebff" d="M 1180,-245 A 5,5 0 0 0 1185,-240 L 1185,-245 z"/>
+ <path style="fill: #c6ebff" d="M 1245,-240 A 5,5 0 0 0 1250,-245 L 1245,-245 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1185" y1="-270" x2="1245" y2="-270"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1185" y1="-240" x2="1245" y2="-240"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1185,-270 A 5,5 0 0 0 1180,-265"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1250,-265 A 5,5 0 0 0 1245,-270"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1180" y1="-265" x2="1180" y2="-245"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1250" y1="-265" x2="1250" y2="-245"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1180,-245 A 5,5 0 0 0 1185,-240"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1245,-240 A 5,5 0 0 0 1250,-245"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1215" y="-252.244">
+ <tspan x="1215" y="-252.244">lttng (CLI)</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #d2edd2" x="1185" y="-310" width="60" height="30"/>
+ <path style="fill: #d2edd2" d="M 1185,-310 A 5,5 0 0 0 1180,-305 L 1185,-305 z"/>
+ <path style="fill: #d2edd2" d="M 1250,-305 A 5,5 0 0 0 1245,-310 L 1245,-305 z"/>
+ <rect style="fill: #d2edd2" x="1180" y="-305" width="70" height="20"/>
+ <path style="fill: #d2edd2" d="M 1180,-285 A 5,5 0 0 0 1185,-280 L 1185,-285 z"/>
+ <path style="fill: #d2edd2" d="M 1245,-280 A 5,5 0 0 0 1250,-285 L 1245,-285 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1185" y1="-310" x2="1245" y2="-310"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1185" y1="-280" x2="1245" y2="-280"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1185,-310 A 5,5 0 0 0 1180,-305"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1250,-305 A 5,5 0 0 0 1245,-310"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1180" y1="-305" x2="1180" y2="-285"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1250" y1="-305" x2="1250" y2="-285"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1180,-285 A 5,5 0 0 0 1185,-280"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1245,-280 A 5,5 0 0 0 1250,-285"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1215" y="-292.244">
+ <tspan x="1215" y="-292.244">liblttng-ctl</tspan>
+ </text>
+ </g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1215" y1="-280" x2="1215" y2="-270"/>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #eb595e" points="1118.24,-545 1132,-545 1132,-434 1085,-434 1085,-418.236 "/>
+ <polygon style="fill: #eb595e" points="1112.24,-545 1120.24,-549 1118.24,-545 1120.24,-541 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1112.24,-545 1120.24,-549 1118.24,-545 1120.24,-541 "/>
+ <polygon style="fill: #eb595e" points="1085,-412.236 1081,-420.236 1085,-418.236 1089,-420.236 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1085,-412.236 1081,-420.236 1085,-418.236 1089,-420.236 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #eb595e" points="1118.24,-387.5 1215,-387.5 1215,-318.236 "/>
+ <polygon style="fill: #eb595e" points="1112.24,-387.5 1120.24,-391.5 1118.24,-387.5 1120.24,-383.5 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1112.24,-387.5 1120.24,-391.5 1118.24,-387.5 1120.24,-383.5 "/>
+ <polygon style="fill: #eb595e" points="1215,-312.236 1211,-320.236 1215,-318.236 1219,-320.236 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1215,-312.236 1211,-320.236 1215,-318.236 1219,-320.236 "/>
+ </g>
+ <text font-size="11.2889" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:700" x="1060" y="-616.239">
+ <tspan x="1060" y="-616.239">Target (monitored) system</tspan>
+ </text>
+ <text font-size="11.2889" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:700" x="1030" y="-116.075">
+ <tspan x="1030" y="-116.075">Remote system</tspan>
+ </text>
+ <g>
+ <rect style="fill: #c6ebff" x="1015" y="-190" width="90" height="30"/>
+ <path style="fill: #c6ebff" d="M 1015,-190 A 5,5 0 0 0 1010,-185 L 1015,-185 z"/>
+ <path style="fill: #c6ebff" d="M 1110,-185 A 5,5 0 0 0 1105,-190 L 1105,-185 z"/>
+ <rect style="fill: #c6ebff" x="1010" y="-185" width="100" height="20"/>
+ <path style="fill: #c6ebff" d="M 1010,-165 A 5,5 0 0 0 1015,-160 L 1015,-165 z"/>
+ <path style="fill: #c6ebff" d="M 1105,-160 A 5,5 0 0 0 1110,-165 L 1105,-165 z"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-190" x2="1105" y2="-190"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1015" y1="-160" x2="1105" y2="-160"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1015,-190 A 5,5 0 0 0 1010,-185"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1110,-185 A 5,5 0 0 0 1105,-190"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1010" y1="-185" x2="1010" y2="-165"/>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1110" y1="-185" x2="1110" y2="-165"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1010,-165 A 5,5 0 0 0 1015,-160"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 1105,-160 A 5,5 0 0 0 1110,-165"/>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1060" y="-172.244">
+ <tspan x="1060" y="-172.244">lttng-relayd</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1060" y1="-318" x2="1060" y2="-198.236"/>
+ <polygon style="fill: #000000" points="1060,-192.236 1056,-200.236 1060,-198.236 1064,-200.236 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1060,-192.236 1056,-200.236 1060,-198.236 1064,-200.236 "/>
+ </g>
+ <g>
+ <path style="fill: #ffffff" d="M 920 -290.333 C 928.57,-297.583 932.855,-300 941.425,-300 C 949.995,-300 954.28,-297.583 962.85,-290.333 L 962.85,-251.667 C 954.28,-244.417 949.995,-242 941.425,-242 C 932.855,-242 928.57,-244.417 920,-251.667 L 920,-290.333z"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 920 -290.333 C 928.57,-297.583 932.855,-300 941.425,-300 C 949.995,-300 954.28,-297.583 962.85,-290.333 L 962.85,-251.667 C 954.28,-244.417 949.995,-242 941.425,-242 C 932.855,-242 928.57,-244.417 920,-251.667 L 920,-290.333"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 920 -290.333 C 928.57,-283.083 932.855,-280.667 941.425,-280.667 C 949.995,-280.667 954.28,-283.083 962.85,-290.333"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="941.425" y="-268.989">
+ <tspan x="941.425" y="-268.989">CTF</tspan>
+ <tspan x="941.425" y="-257.7">traces</tspan>
+ </text>
+ </g>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1035,-318 1035,-275.833 971.086,-275.833 "/>
+ <polygon style="fill: #000000" points="965.086,-275.833 973.086,-279.833 971.086,-275.833 973.086,-271.833 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="965.086,-275.833 973.086,-279.833 971.086,-275.833 973.086,-271.833 "/>
+ </g>
+ <g>
+ <path style="fill: #ffffff" d="M 920 -189.652 C 928.57,-196.902 932.855,-199.318 941.425,-199.318 C 949.995,-199.318 954.28,-196.902 962.85,-189.652 L 962.85,-150.985 C 954.28,-143.735 949.995,-141.318 941.425,-141.318 C 932.855,-141.318 928.57,-143.735 920,-150.985 L 920,-189.652z"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 920 -189.652 C 928.57,-196.902 932.855,-199.318 941.425,-199.318 C 949.995,-199.318 954.28,-196.902 962.85,-189.652 L 962.85,-150.985 C 954.28,-143.735 949.995,-141.318 941.425,-141.318 C 932.855,-141.318 928.57,-143.735 920,-150.985 L 920,-189.652"/>
+ <path style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" d="M 920 -189.652 C 928.57,-182.402 932.855,-179.985 941.425,-179.985 C 949.995,-179.985 954.28,-182.402 962.85,-189.652"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="941.425" y="-168.307">
+ <tspan x="941.425" y="-168.307">CTF</tspan>
+ <tspan x="941.425" y="-157.018">traces</tspan>
+ </text>
+ </g>
+ <text font-size="9.03111" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1030" y="-106.875">
+ <tspan x="1030" y="-106.875">(may be local as well)</tspan>
+ </text>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="971.086" y1="-175.125" x2="1010" y2="-175"/>
+ <polygon style="fill: #000000" points="965.086,-175.145 973.099,-179.119 971.086,-175.125 973.073,-171.119 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="965.086,-175.145 973.099,-179.119 971.086,-175.125 973.073,-171.119 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #eb595e" points="1085,-371.764 1085,-359.6 1140,-359.6 1140,-175 1118.24,-175 "/>
+ <polygon style="fill: #eb595e" points="1085,-377.764 1089,-369.764 1085,-371.764 1081,-369.764 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1085,-377.764 1089,-369.764 1085,-371.764 1081,-369.764 "/>
+ <polygon style="fill: #eb595e" points="1112.24,-175 1120.24,-179 1118.24,-175 1120.24,-171 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1112.24,-175 1120.24,-179 1118.24,-175 1120.24,-171 "/>
+ </g>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #eb595e" x1="1188.24" y1="-190" x2="1251.76" y2="-190"/>
+ <polygon style="fill: #eb595e" points="1182.24,-190 1190.24,-194 1188.24,-190 1190.24,-186 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1182.24,-190 1190.24,-194 1188.24,-190 1190.24,-186 "/>
+ <polygon style="fill: #eb595e" points="1257.76,-190 1249.76,-186 1251.76,-190 1249.76,-194 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #eb595e" points="1257.76,-190 1249.76,-186 1251.76,-190 1249.76,-194 "/>
+ </g>
+ <g>
+ <rect style="fill: #f0f0f0" x="1051.62" y="-265.275" width="16.75" height="10.55"/>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1060" y="-256.875">
+ <tspan x="1060" y="-256.875">TCP</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #f0f0f0" x="1131.62" y="-265.275" width="16.75" height="10.55"/>
+ <text font-size="9.03097" style="fill: #eb595e;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1140" y="-256.875">
+ <tspan x="1140" y="-256.875">TCP</tspan>
+ </text>
+ </g>
+ <text font-size="9.03097" style="fill: #eb595e;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1220" y="-196.875">
+ <tspan x="1220" y="-196.875">Control</tspan>
+ </text>
+ <g>
+ <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="1180" y1="-160" x2="1251.76" y2="-160"/>
+ <polygon style="fill: #000000" points="1257.76,-160 1249.76,-156 1251.76,-160 1249.76,-164 "/>
+ <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="1257.76,-160 1249.76,-156 1251.76,-160 1249.76,-164 "/>
+ </g>
+ <text font-size="9.03097" style="fill: #000000;text-anchor:middle;font-family: Helvetica, Arial, sans-serif;font-style:normal;font-weight:normal" x="1220" y="-166.875">
+ <tspan x="1220" y="-166.875">Trace data</tspan>
+ </text>
+</svg>
--- /dev/null
+title: The <span class="reset-text-transform">LTTng</span> Documentation
+cats:
+ - id: nuts-and-bolts
+ title: Nuts and bolts
+ - id: installing-lttng
+ title: Installing <span class="reset-text-transform">LTTng</span>
+ cats:
+ - id: desktop-distributions
+ title: Desktop distributions
+ cats:
+ - id: ubuntu
+ title: Ubuntu
+ cats:
+ - id: ubuntu-official-repositories
+ title: Official repositories
+ - id: ubuntu-ppa
+ title: PPA
+ - id: fedora
+ title: Fedora
+ - id: debian
+ title: Debian
+ - id: opensuse
+ title: openSUSE/RPM
+ - id: archlinux
+ title: Arch Linux
+ - id: enterprise-distributions
+ title: "Enterprise distributions (<abbr title=\"Red Hat Enterprise Linux\">RHEL</abbr>, <abbr title=\"SUSE Linux Enterprise Server\">SLES</abbr>)"
+ - id: embedded-distributions
+ title: Embedded distributions
+ cats:
+ - id: buildroot
+ title: Buildroot
+ - id: oe-yocto
+ title: OpenEmbedded/Yocto
+ - id: building-from-source
+ title: Building from source
+ - id: getting-started
+ title: Getting started with <span class="reset-text-transform">LTTng</span>
+ cats:
+ - id: tracing-the-linux-kernel
+ title: Tracing the Linux kernel
+ - id: tracing-your-own-user-application
+ title: Tracing your own user application
+ - id: viewing-and-analyzing-your-traces
+ title: Viewing and analyzing your traces
+ - id: understanding-lttng
+ title: Understanding <span class="reset-text-transform">LTTng</span>
+ cats:
+ - id: core-concepts
+ title: Core concepts
+ cats:
+ - id: tracing-session
+ title: Tracing session
+ - id: domain
+ title: Domain
+ - id: channel
+ title: Channel
+ cats:
+ - id: channel-overwrite-mode-vs-discard-mode
+ title: Overwrite and discard event loss modes
+ - id: channel-subbuf-size-vs-subbuf-count
+ title: Sub-buffers count and size
+ - id: channel-switch-timer
+ title: Switch timer
+ - id: channel-buffering-schemes
+ title: Buffering schemes
+ - id: event
+ title: Event
+ - id: plumbing
+ title: Plumbing
+ cats:
+ - id: plumbing-overview
+ title: Overview
+ - id: lttng-sessiond
+ title: Session daemon
+ - id: lttng-consumerd
+ title: Consumer daemon
+ - id: lttng-relayd
+ title: Relay daemon
+ - id: liblttng-ctl-lttng
+ title: Control library and command line interface
+ - id: lttng-ust
+ title: User space tracing library
+ - id: lttng-modules
+ title: <span class="reset-text-transform">LTTng</span> kernel modules
+ - id: using-lttng
+ title: Using <span class="reset-text-transform">LTTng</span>
+ cats:
+ - id: instrumenting
+ title: Instrumenting
+ cats:
+ - id: c-application
+ title: C application
+ cats:
+ - id: tracepoint-provider
+ title: Tracepoint provider
+ - id: lttng-gen-tp
+ title: Using <code>lttng-gen-tp</code>
+ - id: defining-tracepoints
+ title: Defining tracepoints
+ - id: assigning-log-levels
+ title: Assigning log levels to tracepoints
+ - id: probing-the-application-source-code
+ title: Probing the application's source code
+ - id: building-tracepoint-providers-and-user-application
+ title: Building/linking tracepoint providers and the user application
+ cats:
+ - id: static-linking
+ title: Static linking
+ - id: dynamic-linking
+ title: Dynamic linking
+ - id: using-lttng-ust-with-daemons
+ title: Using <span class="reset-text-transform">LTTng</span>-UST with daemons
+ - id: lttng-ust-pkg-config
+ title: <span class="reset-text-transform">pkg-config</span>
+ - id: tracef
+ title: Using <code>tracef()</code>
+ - id: lttng-ust-environment-variables-compiler-flags
+ title: <span class="reset-text-transform">LTTng</span>-UST environment variables and special compilation flags
+ - id: cxx-application
+ title: C++ application
+ - id: prebuilt-ust-helpers
+ title: Prebuilt user space tracing helpers
+ cats:
+ - id: liblttng‑ust‑libc‑pthread-wrapper
+ title: C standard library and POSIX threads tracing
+ - id: liblttng‑ust‑cyg‑profile
+ title: Function tracing
+ - id: liblttng‑ust‑dl
+ title: Dynamic linker tracing
+ - id: java-application
+ title: Java application
+ - id: instrumenting-linux-kernel
+ title: Linux kernel
+ cats:
+ - id: instrumenting-linux-kernel-itself
+ title: Instrumenting the Linux kernel for <span class="reset-text-transform">LTTng</span>
+ cats:
+ - id: mainline-trace-event
+ title: Defining/using tracepoints with mainline <code>TRACE_EVENT()</code> infrastructure
+ - id: lttng-adaptation-layer
+ title: Adding the <span class="reset-text-transform">LTTng</span> adaptation layer
+ - id: instrumenting-linux-kernel-tracing
+ title: Tracing
+ - id: instrumenting-out-of-tree-linux-kernel
+ title: Instrumenting an out-of-tree Linux kernel module for <span class="reset-text-transform">LTTng</span>
+ - id: proc-lttng-logger-abi
+ title: <span class="reset-text-transform">LTTng</span> logger ABI
+ - id: advanced-instrumenting-techniques
+ title: Advanced techniques
+ cats:
+ - id: instrumenting-32-bit-app-on-64-bit-system
+ title: Instrumenting a 32-bit application on a 64-bit system
+ cats:
+ - id: building-32-bit-userspace-rcu
+ title: Building 32-bit Userspace RCU
+ - id: building-32-bit-lttng-ust
+ title: Building 32-bit <span class="reset-text-transform">LTTng</span>-UST
+ - id: building-32-bit-lttng-tools
+ title: Building 32-bit <span class="reset-text-transform">LTTng</span>-tools
+ - id: building-64-bit-lttng-tools
+ title: Building 64-bit <span class="reset-text-transform">LTTng</span>-tools
+ - id: building-instrumented-32-bit-c-application
+ title: Building an instrumented 32-bit C application
+ - id: running-32-bit-and-64-bit-c-applications
+ title: Running 32-bit and 64-bit versions of an instrumented C application
+ - id: controlling-tracing
+ title: Controlling tracing
+ cats:
+ - id: creating-destroying-tracing-sessions
+ title: Creating and destroying tracing sessions
+ - id: enabling-disabling-events
+ title: Enabling and disabling events
+ - id: basic-tracing-session-control
+ title: Basic tracing session control
+ - id: enabling-disabling-channels
+ title: Enabling and disabling channels
+ cats:
+ - id: fine-tuning-channels
+ title: Fine-tuning channels
+ - id: adding-context
+ title: Adding some context to channels
+ - id: saving-loading-tracing-session
+ title: Saving and loading tracing session configurations
+ - id: sending-trace-data-over-the-network
+ title: Sending trace data over the network
+ - id: lttng-live
+ title: Viewing events as they arrive
+ - id: taking-a-snapshot
+ title: Taking a snapshot
+ - id: reference
+ title: Reference
+ cats:
+ - id: online-lttng-manpages
+ title: Online <span class="reset-text-transform">LTTng</span> manpages
+ - id: lttng-ust-ref
+ title: <span class="reset-text-transform">LTTng</span>-UST
+ cats:
+ - id: liblttng-ust
+ title: <span class="reset-text-transform">LTTng</span>-UST library (<code>liblttng‑ust</code>)
+ cats:
+ - id: liblttng-ust-tp-fields
+ title: Tracepoint fields macros (for <code>TP_FIELDS()</code>)
+ - id: liblttng-ust-tracepoint-loglevel
+ title: Tracepoint log levels (for <code>TRACEPOINT_LOGLEVEL()</code>)
+ - id: lttng-modules-ref
+ title: <span class="reset-text-transform">LTTng</span>-modules
+ cats:
+ - id: lttng-modules-tp-struct-entry
+ title: Tracepoint fields macros (for <code>TP_STRUCT__entry()</code>)
+ - id: lttng-modules-tp-fast-assign
+ title: Tracepoint assignment macros (for <code>TP_fast_assign()</code>)
--- /dev/null
+#!/usr/bin/env python3
+
+# The MIT License (MIT)
+#
+# Copyright (c) 2014 Philippe Proulx <eepp.ca>
+# Copyright (c) 2014 The LTTng Project <lttng.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+import re
+import os
+import sys
+from termcolor import colored
+
+
+TOC_PATH = 'toc/docs.yml'
+CONTENTS_ROOT_PATH = 'contents'
+
+
+def _perror(filename, msg):
+ s = '{} {} {}'.format(filename, colored('Error:', 'red'),
+ colored(msg, 'red', attrs=['bold']))
+ print(s)
+
+
+def _pwarn(filename, msg):
+ s = '{} {} {}'.format(filename, colored('Warning:', 'yellow'),
+ colored(msg, 'yellow', attrs=['bold']))
+ print(s)
+
+
+def _get_files(root):
+ files = []
+
+ for dirpath, dirnames, filenames in os.walk(root):
+ for f in filenames:
+ files.append(os.path.join(dirpath, f))
+
+ return sorted(files)
+
+
+def _get_toc_ids(path):
+ p = re.compile(r'id\s*:\s*(.+)$', flags=re.M)
+
+ with open(path) as f:
+ orig_ids = p.findall(f.read())
+
+ ids = set(orig_ids)
+
+ if len(ids) != len(orig_ids):
+ _perror(path, 'Duplicate IDs')
+ return None
+
+ return ids
+
+
+def _check_file_links(toc_ids, path, c):
+ ilinkp = re.compile(r'\[[^\]]+\]\(([^)]+)\)', flags=re.M)
+ elinkp = re.compile(r'href="([^"]+)"')
+
+ ret = True
+
+ ilinks = ilinkp.findall(c)
+ elinks = elinkp.findall(c)
+
+ for link in ilinks:
+ if not link.startswith('#doc-'):
+ s = 'Internal link does not start with "#doc-": "{}"'.format(link)
+ _perror(path, s)
+ ret = False
+ continue
+
+ sid = link[5:]
+
+ if sid not in toc_ids:
+ _perror(path, 'Dead internal link: "{}"'.format(link))
+ ret = False
+
+ for link in elinks:
+ if link.startswith('#'):
+ _pwarn(path, 'External link starts with #: "{}"'.format(link))
+ ret = False
+
+ return ret
+
+
+def _check_contents(toc_ids, contents_files):
+ ret = True
+
+ for path in contents_files:
+ with open(path) as f:
+ c = f.read()
+
+ ret &= _check_file_links(toc_ids, path, c)
+
+ return ret
+
+
+def _check_non_md(files):
+ ret = True
+
+ for f in files:
+ if not f.endswith('.md'):
+ _perror(f, 'Wrong, non-Markdown file')
+ ret = False
+
+ return ret
+
+
+def checkdocs():
+ toc_ids = _get_toc_ids(TOC_PATH)
+
+ if toc_ids is None:
+ return False
+
+ contents_files = _get_files(CONTENTS_ROOT_PATH)
+
+ if not _check_non_md(contents_files):
+ return False
+
+ if not _check_contents(toc_ids, contents_files):
+ return False
+
+ return True
+
+
+if __name__ == '__main__':
+ sys.exit(0 if checkdocs() else 1)