1 // SPDX-FileCopyrightText: 2016 Philippe Proulx <pproulx@efficios.com>
2 // SPDX-License-Identifier: CC-BY-4.0
11 lttng-ust - LTTng user space tracing
17 *#include <lttng/tracepoint.h>*
20 #define *LTTNG_UST_TP_ARGS*('args'...)
21 #define *LTTNG_UST_TP_ENUM_VALUES*('values'...)
22 #define *LTTNG_UST_TP_FIELDS*('fields'...)
23 #define *LTTNG_UST_TRACEPOINT_ENUM*('prov_name', 'enum_name', 'mappings')
24 #define *LTTNG_UST_TRACEPOINT_EVENT*('prov_name', 't_name', 'args', 'fields')
25 #define *LTTNG_UST_TRACEPOINT_EVENT_CLASS*('cls_prov_name', 'cls_name',
27 #define *LTTNG_UST_TRACEPOINT_EVENT_INSTANCE*('cls_prov_name', 'cls_name',
28 'inst_prov_name', 't_name', 'args')
29 #define *LTTNG_UST_TRACEPOINT_LOGLEVEL*('prov_name', 't_name', 'level')
30 #define *lttng_ust_do_tracepoint*('prov_name', 't_name', ...)
31 #define *lttng_ust_field_array*('int_type', 'field_name', 'expr', 'count')
32 #define *lttng_ust_field_array_nowrite*('int_type', 'field_name', 'expr', 'count')
33 #define *lttng_ust_field_array_hex*('int_type', 'field_name', 'expr', 'count')
34 #define *lttng_ust_field_array_nowrite_hex*('int_type', 'field_name', 'expr',
36 #define *lttng_ust_field_array_network*('int_type', 'field_name', 'expr', 'count')
37 #define *lttng_ust_field_array_network_nowrite*('int_type', 'field_name',
39 #define *lttng_ust_field_array_network_hex*('int_type', 'field_name', 'expr',
41 #define *lttng_ust_field_array_network_nowrite_hex*('int_type', 'field_name',
43 #define *lttng_ust_field_array_text*(char, 'field_name', 'expr', 'count')
44 #define *lttng_ust_field_array_text_nowrite*(char, 'field_name', 'expr',
46 #define *lttng_ust_field_enum*('prov_name', 'enum_name', 'int_type', 'field_name',
48 #define *lttng_ust_field_enum_nowrite*('prov_name', 'enum_name', 'int_type',
50 #define *lttng_ust_field_enum_value*('label', 'value')
51 #define *lttng_ust_field_enum_range*('label', 'start', 'end')
52 #define *lttng_ust_field_float*('float_type', 'field_name', 'expr')
53 #define *lttng_ust_field_float_nowrite*('float_type', 'field_name', 'expr')
54 #define *lttng_ust_field_integer*('int_type', 'field_name', 'expr')
55 #define *lttng_ust_field_integer_hex*('int_type', 'field_name', 'expr')
56 #define *lttng_ust_field_integer_network*('int_type', 'field_name', 'expr')
57 #define *lttng_ust_field_integer_network_hex*('int_type', 'field_name', 'expr')
58 #define *lttng_ust_field_integer_nowrite*('int_type', 'field_name', 'expr')
59 #define *lttng_ust_field_sequence*('int_type', 'field_name', 'expr',
60 'len_type', 'len_expr')
61 #define *lttng_ust_field_sequence_nowrite*('int_type', 'field_name', 'expr',
62 'len_type', 'len_expr')
63 #define *lttng_ust_field_sequence_hex*('int_type', 'field_name', 'expr',
64 'len_type', 'len_expr')
65 #define *lttng_ust_field_sequence_nowrite_hex*('int_type', 'field_name', 'expr',
66 'len_type', 'len_expr')
67 #define *lttng_ust_field_sequence_network*('int_type', 'field_name', 'expr',
68 'len_type', 'len_expr')
69 #define *lttng_ust_field_sequence_network_nowrite*('int_type', 'field_name',
72 #define *lttng_ust_field_sequence_network_hex*('int_type', 'field_name', 'expr',
73 'len_type', 'len_expr')
74 #define *lttng_ust_field_sequence_network_nowrite_hex*('int_type',
78 #define *lttng_ust_field_sequence_text*(char, 'field_name', 'expr', 'len_type',
80 #define *lttng_ust_field_sequence_text_nowrite*(char, 'field_name', 'expr',
81 'len_type', 'len_expr')
82 #define *lttng_ust_field_string*('field_name', 'expr')
83 #define *lttng_ust_field_string_nowrite*('field_name', 'expr')
84 #define *lttng_ust_tracepoint*('prov_name', 't_name', ...)
85 #define *lttng_ust_tracepoint_enabled*('prov_name', 't_name')
87 Link with, following this manual page:
90 * If you define `_LGPL_SOURCE` before including
91 `<lttng/tracepoint.h>` (directly or indirectly): `-llttng-ust-common`
96 The http://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
97 source software package used for correlated tracing of the Linux kernel,
98 user applications, and user libraries.
100 LTTng-UST is the user space tracing component of the LTTng project. It
101 is a port to user space of the low-overhead tracing capabilities of the
102 LTTng Linux kernel tracer. The `liblttng-ust` library is used to trace
103 user applications and libraries.
105 NOTE: This man page is about the `liblttng-ust` library. The LTTng-UST
106 project also provides Java and Python packages to trace applications
107 written in those languages. How to instrument and trace Java and Python
108 applications is documented in
109 http://lttng.org/docs/[the online LTTng documentation].
111 There are three ways to use `liblttng-ust`:
113 * Using the man:lttng_ust_tracef(3) API, which is similar to
115 * Using the man:lttng_ust_tracelog(3) API, which is
116 man:lttng_ust_tracef(3) with a log level parameter.
117 * Defining your own tracepoints. See the
118 <<creating-tp,Creating a tracepoint provider>> section below.
121 Compatibility with previous APIs
122 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123 Since LTTng-UST{nbsp}2.13, the `LTTNG_UST_COMPAT_API_VERSION` definition
124 controls which LTTng-UST APIs are available (compiled):
127 All APIs are available.
129 'N' (0 or positive integer)::
130 API version{nbsp}__N__, and all the following existing APIs, are
131 available. Previous APIs are not available (not compiled).
133 The following table shows the mapping from LTTng-UST versions (up to
134 LTTng-UST{nbsp}{manversion}) to available API versions:
138 |LTTng-UST version |Available API versions
143 This manual page **only** documents version{nbsp}1 of the API.
145 If you wish to have access to version{nbsp}0 of the API (for example,
146 the `tracepoint()`, `ctf_integer()`, and `TRACEPOINT_EVENT()` macros),
147 then either don't define `LTTNG_UST_COMPAT_API_VERSION`, or define it to
148 `0` before including any LTTng-UST header.
152 Creating a tracepoint provider
153 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154 Creating a tracepoint provider is the first step of using
155 `liblttng-ust`. The next steps are:
157 * <<tracepoint,Instrumenting your application with
158 `lttng_ust_tracepoint()` calls>>
159 * Building your application with LTTng-UST support, either
160 <<build-static,statically>> or <<build-dynamic,dynamically>>.
162 A *tracepoint provider* is a compiled object containing the event probes
163 corresponding to your custom tracepoint definitions. A tracepoint
164 provider contains the code to get the size of an event and to serialize
165 it, amongst other things.
167 To create a tracepoint provider, start with the following
168 _tracepoint provider header_ template:
170 ------------------------------------------------------------------------
171 #undef LTTNG_UST_TRACEPOINT_PROVIDER
172 #define LTTNG_UST_TRACEPOINT_PROVIDER my_provider
174 #undef LTTNG_UST_TRACEPOINT_INCLUDE
175 #define LTTNG_UST_TRACEPOINT_INCLUDE "./tp.h"
177 #if !defined(_TP_H) || \
178 defined(LTTNG_UST_TRACEPOINT_HEADER_MULTI_READ)
181 #include <lttng/tracepoint.h>
184 * LTTNG_UST_TRACEPOINT_EVENT(), LTTNG_UST_TRACEPOINT_EVENT_CLASS(),
185 * LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(),
186 * LTTNG_UST_TRACEPOINT_LOGLEVEL(), and `LTTNG_UST_TRACEPOINT_ENUM()`
192 #include <lttng/tracepoint-event.h>
193 ------------------------------------------------------------------------
195 In this template, the tracepoint provider is named `my_provider`
196 (`LTTNG_UST_TRACEPOINT_PROVIDER` definition). The file needs to bear the
197 name of the `LTTNG_UST_TRACEPOINT_INCLUDE` definition (`tp.h` in this case).
198 Between `#include <lttng/tracepoint.h>` and `#endif` go
199 the invocations of the <<tracepoint-event,`LTTNG_UST_TRACEPOINT_EVENT()`>>,
200 <<tracepoint-event-class,`LTTNG_UST_TRACEPOINT_EVENT_CLASS()`>>,
201 <<tracepoint-event-class,`LTTNG_UST_TRACEPOINT_EVENT_INSTANCE()`>>,
202 <<tracepoint-loglevel,`LTTNG_UST_TRACEPOINT_LOGLEVEL()`>>, and
203 <<tracepoint-enum,`LTTNG_UST_TRACEPOINT_ENUM()`>> macros.
205 NOTE: You can avoid writing the prologue and epilogue boilerplate in the
206 template file above by using the man:lttng-gen-tp(1) tool shipped with
209 The tracepoint provider header file needs to be included in a source
210 file which looks like this:
212 ------------------------------------------------------------------------
213 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
216 ------------------------------------------------------------------------
218 Together, those two files (let's call them `tp.h` and `tp.c`) form the
219 tracepoint provider sources, ready to be compiled.
221 You can create multiple tracepoint providers to be used in a single
222 application, but each one must have its own header file.
224 The <<tracepoint-event,`LTTNG_UST_TRACEPOINT_EVENT()` usage>> section below
225 shows how to use the `LTTNG_UST_TRACEPOINT_EVENT()` macro to define the actual
226 tracepoints in the tracepoint provider header file.
228 See the <<example,EXAMPLE>> section below for a complete example.
232 `LTTNG_UST_TRACEPOINT_EVENT()` usage
233 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
234 The `LTTNG_UST_TRACEPOINT_EVENT()` macro is used in a template provider
235 header file (see the <<creating-tp,Creating a tracepoint provider>>
236 section above) to define LTTng-UST tracepoints.
238 The `LTTNG_UST_TRACEPOINT_EVENT()` usage template is as follows:
240 ------------------------------------------------------------------------
241 LTTNG_UST_TRACEPOINT_EVENT(
242 /* Tracepoint provider name */
245 /* Tracepoint/event name */
248 /* List of tracepoint arguments (input) */
253 /* List of fields of eventual event (output) */
258 ------------------------------------------------------------------------
260 The `LTTNG_UST_TP_ARGS()` macro contains the input arguments of the tracepoint.
261 Those arguments can be used in the argument expressions of the output
262 fields defined in `LTTNG_UST_TP_FIELDS()`.
264 The format of the `LTTNG_UST_TP_ARGS()` parameters is: C type, then argument name;
265 repeat as needed, up to ten times. For example:
267 ------------------------------------------------------------------------
270 const char *, my_string,
273 struct my_data *, my_data
275 ------------------------------------------------------------------------
277 The `LTTNG_UST_TP_FIELDS()` macro contains the output fields of the tracepoint,
278 that is, the actual data that can be recorded in the payload of an event
279 emitted by this tracepoint.
281 The `LTTNG_UST_TP_FIELDS()` macro contains a list of
282 `lttng_ust_field_*()` macros :not: separated by commas.
283 The available macros are documented in the
284 <<ctf-macros,Available `lttng_ust_field_*()` field type macros>>
289 Available field macros
290 ~~~~~~~~~~~~~~~~~~~~~~
291 This section documents the available `lttng_ust_field_*()` macros that
292 can be inserted in the `LTTNG_UST_TP_FIELDS()` macro of the
293 <<tracepoint-event,`LTTNG_UST_TRACEPOINT_EVENT()` macro>>.
295 Standard integer, displayed in base 10:
298 *lttng_ust_field_integer*('int_type', 'field_name', 'expr')
299 *lttng_ust_field_integer_nowrite*('int_type', 'field_name', 'expr')
301 Standard integer, displayed in base 16:
304 *lttng_ust_field_integer_hex*('int_type', 'field_name', 'expr')
306 Integer in network byte order (big endian), displayed in base 10:
309 *lttng_ust_field_integer_network*('int_type', 'field_name', 'expr')
311 Integer in network byte order, displayed in base 16:
314 *lttng_ust_field_integer_network_hex*('int_type', 'field_name', 'expr')
316 Floating point number:
319 *lttng_ust_field_float*('float_type', 'field_name', 'expr')
320 *lttng_ust_field_float_nowrite*('float_type', 'field_name', 'expr')
322 Null-terminated string:
325 *lttng_ust_field_string*('field_name', 'expr')
326 *lttng_ust_field_string_nowrite*('field_name', 'expr')
328 Statically-sized array of integers (`_hex` versions displayed in
329 hexadecimal, `_network` versions in network byte order):
332 *lttng_ust_field_array*('int_type', 'field_name', 'expr', 'count')
333 *lttng_ust_field_array_nowrite*('int_type', 'field_name', 'expr', 'count')
334 *lttng_ust_field_array_hex*('int_type', 'field_name', 'expr', 'count')
335 *lttng_ust_field_array_nowrite_hex*('int_type', 'field_name', 'expr', 'count')
336 *lttng_ust_field_array_network*('int_type', 'field_name', 'expr', 'count')
337 *lttng_ust_field_array_network_nowrite*('int_type', 'field_name', 'expr',
339 *lttng_ust_field_array_network_hex*('int_type', 'field_name', 'expr', 'count')
340 *lttng_ust_field_array_network_nowrite_hex*('int_type', 'field_name',
343 Statically-sized array, printed as text; no need to be null-terminated:
346 *lttng_ust_field_array_text*(char, 'field_name', 'expr', 'count')
347 *lttng_ust_field_array_text_nowrite*(char, 'field_name', 'expr', 'count')
349 Dynamically-sized array of integers (`_hex` versions displayed in
350 hexadecimal, `_network` versions in network byte order):
353 *lttng_ust_field_sequence*('int_type', 'field_name', 'expr', 'len_type',
355 *lttng_ust_field_sequence_nowrite*('int_type', 'field_name', 'expr',
356 'len_type', 'len_expr')
357 *lttng_ust_field_sequence_hex*('int_type', 'field_name', 'expr', 'len_type',
359 *lttng_ust_field_sequence_nowrite_hex*('int_type', 'field_name', 'expr',
360 'len_type', 'len_expr')
361 *lttng_ust_field_sequence_network*('int_type', 'field_name', 'expr',
362 'len_type', 'len_expr')
363 *lttng_ust_field_sequence_network_nowrite*('int_type', 'field_name', 'expr',
364 'len_type', 'len_expr')
365 *lttng_ust_field_sequence_network_hex*('int_type', 'field_name', 'expr',
366 'len_type', 'len_expr')
367 *lttng_ust_field_sequence_network_nowrite_hex*('int_type', 'field_name',
371 Dynamically-sized array, displayed as text; no need to be null-terminated:
374 *lttng_ust_field_sequence_text*(char, 'field_name', 'expr', 'len_type',
376 *lttng_ust_field_sequence_text_nowrite*(char, 'field_name', 'expr',
377 'len_type', 'len_expr')
379 Enumeration. The enumeration field must be defined before using this
380 macro with the `LTTNG_UST_TRACEPOINT_ENUM()` macro. See the
381 <<tracepoint-enum,`LTTNG_UST_TRACEPOINT_ENUM()` usage>> section for more
385 *lttng_ust_field_enum*('prov_name', 'enum_name', 'int_type', 'field_name',
387 *lttng_ust_field_enum_nowrite*('prov_name', 'enum_name', 'int_type',
388 'field_name', 'expr')
393 Number of elements in array/sequence. This must be known at
397 Name of an enumeration field previously defined with the
398 `LTTNG_UST_TRACEPOINT_ENUM()` macro. See the
399 <<tracepoint-enum,`LTTNG_UST_TRACEPOINT_ENUM()` usage>> section for more
403 C expression resulting in the field's value. This expression can
404 use one or more arguments passed to the tracepoint. The arguments
405 of a given tracepoint are defined in the `LTTNG_UST_TP_ARGS()` macro (see
406 the <<creating-tp,Creating a tracepoint provider>> section above).
409 Event field name (C identifier syntax, :not: a literal string).
412 Float C type (`float` or `double`). The size of this type determines
413 the size of the floating point number field.
416 Integer C type. The size of this type determines the size of the
417 integer/enumeration field.
420 C expression resulting in the sequence's length. This expression
421 can use one or more arguments passed to the tracepoint.
424 Unsigned integer C type of sequence's length.
427 Tracepoint provider name. This must be the same as the tracepoint
428 provider name used in a previous field definition.
430 The `_nowrite` versions omit themselves from the recorded trace, but are
431 otherwise identical. Their primary purpose is to make some of the
432 event context available to the event filters without having to commit
433 the data to sub-buffers. See man:lttng-enable-event(1) to learn more
434 about dynamic event filtering.
436 See the <<example,EXAMPLE>> section below for a complete example.
440 `LTTNG_UST_TRACEPOINT_ENUM()` usage
441 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
442 An enumeration field is a list of mappings between an integers, or a
443 range of integers, and strings (sometimes called _labels_ or
444 _enumerators_). Enumeration fields can be used to have a more compact
445 trace when the possible values for a field are limited.
447 An enumeration field is defined with the `LTTNG_UST_TRACEPOINT_ENUM()`
450 ------------------------------------------------------------------------
451 LTTNG_UST_TRACEPOINT_ENUM(
452 /* Tracepoint provider name */
455 /* Enumeration name (unique in the whole tracepoint provider) */
458 /* Enumeration mappings */
459 LTTNG_UST_TP_ENUM_VALUES(
463 ------------------------------------------------------------------------
465 `LTTNG_UST_TP_ENUM_VALUES()` contains a list of enumeration mappings,
466 :not: separated by commas. Two macros can be used in the
467 `LTTNG_UST_TP_ENUM_VALUES()`: `lttng_ust_field_enum_value()` and
468 `lttng_ust_field_enum_range()`.
470 `lttng_ust_field_enum_value()` is a single value mapping:
473 *lttng_ust_field_enum_value*('label', 'value')
475 This macro maps the given 'label' string to the value 'value'.
477 `lttng_ust_field_enum_range()` is a range mapping:
480 *lttng_ust_field_enum_range*('label', 'start', 'end')
482 This macro maps the given 'label' string to the range of integers from
483 'start' to 'end', inclusively. Range mappings may overlap, but the
484 behaviour is implementation-defined: each trace reader handles
485 overlapping ranges as it wishes.
487 See the <<example,EXAMPLE>> section below for a complete example.
490 [[tracepoint-event-class]]
491 `LTTNG_UST_TRACEPOINT_EVENT_CLASS()` usage
492 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
493 A *tracepoint class* is a class of tracepoints sharing the
494 same field types and names. A tracepoint instance is one instance of
495 such a declared tracepoint class, with its own event name.
497 LTTng-UST creates one event serialization function per tracepoint class.
498 Using `LTTNG_UST_TRACEPOINT_EVENT()` creates one tracepoint class per
499 tracepoint definition, whereas using
500 `LTTNG_UST_TRACEPOINT_EVENT_CLASS()` and
501 `LTTNG_UST_TRACEPOINT_EVENT_INSTANCE()` creates one tracepoint class,
502 and one or more tracepoint instances of this class. In other words, many
503 tracepoints can reuse the same serialization code. Reusing the same
504 code, when possible, can reduce cache pollution, thus improve
507 The `LTTNG_UST_TRACEPOINT_EVENT_CLASS()` macro accepts the same
508 parameters as the `LTTNG_UST_TRACEPOINT_EVENT()` macro, except that
509 instead of an event name, its second parameter is the _tracepoint class
512 ------------------------------------------------------------------------
513 #define LTTNG_UST_TRACEPOINT_PROVIDER my_provider
517 LTTNG_UST_TRACEPOINT_EVENT_CLASS(
518 /* Tracepoint class provider name */
521 /* Tracepoint class name */
524 /* List of tracepoint arguments (input) */
529 /* List of fields of eventual event (output) */
534 ------------------------------------------------------------------------
536 Once the tracepoint class is defined, you can create as many tracepoint
539 -------------------------------------------------------------------------
540 #define LTTNG_UST_TRACEPOINT_PROVIDER natality
544 LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(
545 /* Name of the tracepoint class provider */
548 /* Tracepoint class name */
551 /* Name of the local (instance) tracepoint provider */
554 /* Tracepoint/event name */
557 /* List of tracepoint arguments (input) */
562 ------------------------------------------------------------------------
564 As you can see, the `LTTNG_UST_TRACEPOINT_EVENT_INSTANCE()` does not
565 contain the `LTTNG_UST_TP_FIELDS()` macro, because they are defined at
566 the `LTTNG_UST_TRACEPOINT_EVENT_CLASS()` level.
568 Note that the `LTTNG_UST_TRACEPOINT_EVENT_INSTANCE()` macro requires two
571 * The name of the tracepoint class provider (`my_provider` in the
574 This is the same as the first argument of the
575 `LTTNG_UST_TRACEPOINT_EVENT_CLASS()` expansion to refer to.
577 * The name of the local, or instance, provider (`natality` in the
580 This is the provider name which becomes the prefix part of the name of
581 the events which such a tracepoint creates.
583 The two provider names may be different if the tracepoint class and the
584 tracepoint instance macros are in two different translation units.
586 See the <<example,EXAMPLE>> section below for a complete example.
589 [[tracepoint-loglevel]]
590 `LTTNG_UST_TRACEPOINT_LOGLEVEL()` usage
591 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
592 Optionally, a *log level* can be assigned to a defined tracepoint.
593 Assigning different levels of severity to tracepoints can be useful:
594 when controlling tracing sessions, you can choose to only enable
595 events falling into a specific log level range using the
596 nloption:--loglevel and nloption:--loglevel-only options of the
597 man:lttng-enable-event(1) command.
599 Log levels are assigned to tracepoints that are already defined using
600 the `LTTNG_UST_TRACEPOINT_LOGLEVEL()` macro. The latter must be used
601 after having used `LTTNG_UST_TRACEPOINT_EVENT()` or
602 `LTTNG_UST_TRACEPOINT_EVENT_INSTANCE()` for a given tracepoint. The
603 `LTTNG_UST_TRACEPOINT_LOGLEVEL()` macro is used as follows:
605 ------------------------------------------------------------------------
606 LTTNG_UST_TRACEPOINT_LOGLEVEL(
607 /* Tracepoint provider name */
610 /* Tracepoint/event name */
614 LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO
616 ------------------------------------------------------------------------
618 The available log level definitions are:
620 include::log-levels.txt[]
622 See the <<example,EXAMPLE>> section below for a complete example.
626 Instrumenting your application
627 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
628 Once the tracepoint provider is created (see the
629 <<creating-tp,Creating a tracepoint provider>> section above), you can
630 instrument your application with the defined tracepoints thanks to the
631 `lttng_ust_tracepoint()` macro:
634 #define *lttng_ust_tracepoint*('prov_name', 't_name', ...)
639 Tracepoint provider name.
642 Tracepoint/event name.
645 Tracepoint arguments, if any.
647 Make sure to include the tracepoint provider header file anywhere you
648 use `lttng_ust_tracepoint()` for this provider.
650 NOTE: Even though LTTng-UST supports `lttng_ust_tracepoint()` call site
651 duplicates having the same provider and tracepoint names, it is
652 recommended to use a provider/tracepoint name pair only once within the
653 application source code to help map events back to their call sites when
656 Sometimes, arguments to the tracepoint are expensive to compute (take
657 call stack, for example). To avoid the computation when the tracepoint
658 is disabled, you can use the `lttng_ust_tracepoint_enabled()` and
659 `lttng_ust_do_tracepoint()` macros:
662 #define *lttng_ust_tracepoint_enabled*('prov_name', 't_name')
663 #define *lttng_ust_do_tracepoint*('prov_name', 't_name', ...)
665 `lttng_ust_tracepoint_enabled()` returns a non-zero value if the tracepoint
666 named 't_name' from the provider named 'prov_name' is enabled at
669 `lttng_ust_do_tracepoint()` is like `lttng_ust_tracepoint()`, except that it doesn't check
670 if the tracepoint is enabled. Using `lttng_ust_tracepoint()` with
671 `lttng_ust_tracepoint_enabled()` is dangerous since `lttng_ust_tracepoint()` also contains
672 the `lttng_ust_tracepoint_enabled()` check, thus a race condition is possible
675 ------------------------------------------------------------------------
676 if (lttng_ust_tracepoint_enabled(my_provider, my_tracepoint)) {
677 stuff = prepare_stuff();
680 lttng_ust_tracepoint(my_provider, my_tracepoint, stuff);
681 ------------------------------------------------------------------------
683 If the tracepoint is enabled after the condition, then `stuff` is not
684 prepared: the emitted event will either contain wrong data, or the
685 whole application could crash (segmentation fault, for example).
687 NOTE: Neither `lttng_ust_tracepoint_enabled()` nor
688 `lttng_ust_do_tracepoint()` have a `STAP_PROBEV()` call, so if you need
689 it, you should emit this call yourself.
693 Statically linking the tracepoint provider
694 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
695 With the static linking method, compiled tracepoint providers are copied
696 into the target application.
698 Define `LTTNG_UST_TRACEPOINT_DEFINE` definition below the
699 `LTTNG_UST_TRACEPOINT_CREATE_PROBES` definition in the tracepoint
702 ------------------------------------------------------------------------
703 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
704 #define LTTNG_UST_TRACEPOINT_DEFINE
707 ------------------------------------------------------------------------
709 Create the tracepoint provider object file:
716 NOTE: Although an application instrumented with LTTng-UST tracepoints
717 can be compiled with a $$C++$$ compiler, tracepoint probes
718 should be compiled with a C compiler.
720 At this point, you _can_ archive this tracepoint provider object file,
721 possibly with other object files of your application or with other
722 tracepoint provider object files, as a static library:
729 Using a static library does have the advantage of centralising the
730 tracepoint providers objects so they can be shared between multiple
731 applications. This way, when the tracepoint provider is modified, the
732 source code changes don't have to be patched into each application's
733 source code tree. The applications need to be relinked after each
734 change, but need not to be otherwise recompiled (unless the tracepoint
735 provider's API changes).
737 Then, link your application with this object file (or with the static
738 library containing it) and with `liblttng-ust` and `libdl` (`libc` on a
743 $ cc -o app tp.o app.o -llttng-ust -ldl
748 Dynamically loading the tracepoint provider
749 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
750 The second approach to package the tracepoint provider is to use the
751 dynamic loader: the library and its member functions are explicitly
752 sought, loaded at run time.
754 In this scenario, the tracepoint provider is compiled as a shared
757 The process to create the tracepoint provider shared object is pretty
758 much the same as the <<build-static,static linking method>>, except
761 * Since the tracepoint provider is not part of the application,
762 `LTTNG_UST_TRACEPOINT_DEFINE` must be defined, for each tracepoint
763 provider, in exactly one source file of the _application_
764 * `LTTNG_UST_TRACEPOINT_PROBE_DYNAMIC_LINKAGE` must be defined next to
765 `LTTNG_UST_TRACEPOINT_DEFINE`
767 Regarding `LTTNG_UST_TRACEPOINT_DEFINE` and
768 `LTTNG_UST_TRACEPOINT_PROBE_DYNAMIC_LINKAGE`, the recommended practice
769 is to use a separate C source file in your application to define them,
770 then include the tracepoint provider header files afterwards. For
771 example, as `tp-define.c`:
773 ------------------------------------------------------------------------
774 #define LTTNG_UST_TRACEPOINT_DEFINE
775 #define LTTNG_UST_TRACEPOINT_PROBE_DYNAMIC_LINKAGE
778 ------------------------------------------------------------------------
780 The tracepoint provider object file used to create the shared library is
781 built like it is using the static linking method, but with the
782 nloption:-fpic option:
786 $ cc -c -fpic -I. tp.c
789 It is then linked as a shared library like this:
793 $ cc -shared -Wl,--no-as-needed -o tp.so tp.o -llttng-ust
796 This tracepoint provider shared object isn't linked with the user
797 application: it must be loaded manually. This is why the application is
798 built with no mention of this tracepoint provider, but still needs
803 $ cc -o app app.o tp-define.o -ldl
806 There are two ways to dynamically load the tracepoint provider shared
809 * Load it manually from the application using man:dlopen(3)
810 * Make the dynamic loader load it with the `LD_PRELOAD`
811 environment variable (see man:ld.so(8))
813 If the application does not dynamically load the tracepoint provider
814 shared object using one of the methods above, tracing is disabled for
815 this application, and the events are not listed in the output of
818 Note that it is not safe to use man:dlclose(3) on a tracepoint provider
819 shared object that is being actively used for tracing, due to a lack of
820 reference counting from LTTng-UST to the shared object.
822 For example, statically linking a tracepoint provider to a shared object
823 which is to be dynamically loaded by an application (a plugin, for
824 example) is not safe: the shared object, which contains the tracepoint
825 provider, could be dynamically closed (man:dlclose(3)) at any time by
828 To instrument a shared object, either:
830 * Statically link the tracepoint provider to the application, or
831 * Build the tracepoint provider as a shared object (following the
832 procedure shown in this section), and preload it when tracing is
833 needed using the `LD_PRELOAD` environment variable.
836 Using LTTng-UST with daemons
837 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
838 Some extra care is needed when using `liblttng-ust` with daemon
839 applications that call man:fork(2), man:clone(2), or BSD's man:rfork(2)
840 without a following man:exec(3) family system call. The library
841 `liblttng-ust-fork.so` needs to be preloaded before starting the
842 application with the `LD_PRELOAD` environment variable (see
845 To use `liblttng-ust` with a daemon application which closes file
846 descriptors that were not opened by it, preload the `liblttng-ust-fd.so`
847 library before you start the application. Typical use cases include
848 daemons closing all file descriptors after man:fork(2), and buggy
849 applications doing ``double-closes''.
854 Context information can be prepended by the LTTng-UST tracer before
855 each event, or before specific events.
857 Context fields can be added to specific channels using
858 man:lttng-add-context(1).
860 The following context fields are supported by LTTng-UST:
862 General context fields::
867 NOTE: This context field is always enabled, and it cannot be added
868 with man:lttng-add-context(1). Its main purpose is to be used for
869 dynamic event filtering. See man:lttng-enable-event(1) for more
870 information about event filtering.
873 Instruction pointer: enables recording the exact address from which
874 an event was emitted. This context field can be used to
875 reverse-lookup the source location that caused the event
879 POSIX thread identifier.
881 Can be used on architectures where `pthread_t` maps nicely to an
882 `unsigned long` type.
884 Process context fields::
887 Thread name, as set by man:exec(3) or man:prctl(2). It is
888 recommended that programs set their thread name with man:prctl(2)
889 before hitting the first tracepoint for that thread.
892 Virtual process ID: process ID as seen from the point of view of the
893 current process ID namespace (see man:pid_namespaces(7)).
896 Virtual thread ID: thread ID as seen from the point of view of the
897 current process ID namespace (see man:pid_namespaces(7)).
899 perf context fields::
901 `perf:thread:COUNTER`:::
902 perf counter named 'COUNTER'. Use `lttng add-context --list` to
903 list the available perf counters.
905 Only available on IA-32 and x86-64 architectures.
907 `perf:thread:raw:rN:NAME`:::
908 perf counter with raw ID 'N' and custom name 'NAME'. See
909 man:lttng-add-context(1) for more details.
911 Namespace context fields (see man:namespaces(7))::
914 Inode number of the current control group namespace (see
915 man:cgroup_namespaces(7)) in the proc file system.
918 Inode number of the current IPC namespace (see
919 man:ipc_namespaces(7)) in the proc file system.
922 Inode number of the current mount point namespace (see
923 man:mount_namespaces(7)) in the proc file system.
926 Inode number of the current network namespace (see
927 man:network_namespaces(7)) in the proc file system.
930 Inode number of the current process ID namespace (see
931 man:pid_namespaces(7)) in the proc file system.
934 Inode number of the current clock namespace (see
935 man:time_namespaces(7)) in the proc file system.
938 Inode number of the current user namespace (see
939 man:user_namespaces(7)) in the proc file system.
942 Inode number of the current UTS namespace (see
943 man:uts_namespaces(7)) in the proc file system.
945 Credential context fields (see man:credentials(7))::
948 Virtual real user ID: real user ID as seen from the point of view of
949 the current user namespace (see man:user_namespaces(7)).
952 Virtual real group ID: real group ID as seen from the point of view
953 of the current user namespace (see man:user_namespaces(7)).
956 Virtual effective user ID: effective user ID as seen from the point
957 of view of the current user namespace (see man:user_namespaces(7)).
960 Virtual effective group ID: effective group ID as seen from the
961 point of view of the current user namespace (see
962 man:user_namespaces(7)).
965 Virtual saved set-user ID: saved set-user ID as seen from the point
966 of view of the current user namespace (see man:user_namespaces(7)).
969 Virtual saved set-group ID: saved set-group ID as seen from the
970 point of view of the current user namespace (see
971 man:user_namespaces(7)).
977 If an application that uses `liblttng-ust` becomes part of a tracing
978 session, information about its currently loaded shared objects, their
979 build IDs, and their debug link information are emitted as events
982 The following LTTng-UST state dump events exist and must be enabled
983 to record application state dumps. Note that, during the state dump
984 phase, LTTng-UST can also emit _shared library load/unload_ events
985 (see <<ust-lib,Shared library load/unload tracking>> below).
987 `lttng_ust_statedump:start`::
988 Emitted when the state dump begins.
990 This event has no fields.
992 `lttng_ust_statedump:end`::
993 Emitted when the state dump ends. Once this event is emitted, it
994 is guaranteed that, for a given process, the state dump is
997 This event has no fields.
999 `lttng_ust_statedump:bin_info`::
1000 Emitted when information about a currently loaded executable or
1001 shared object is found.
1007 |Field name |Description
1010 |Base address of loaded executable.
1013 |Size of loaded executable in memory.
1016 |Path to loaded executable file.
1019 |Whether or not the executable is position-independent code.
1022 |Whether or not the executable has a build ID. If this field is 1, you
1023 can expect that an `lttng_ust_statedump:build_id` event record follows
1024 this one (not necessarily immediately after).
1027 |Whether or not the executable has debug link information. If this field
1028 is 1, you can expect that an `lttng_ust_statedump:debug_link` event
1029 record follows this one (not necessarily immediately after).
1032 `lttng_ust_statedump:build_id`::
1033 Emitted when a build ID is found in a currently loaded shared
1035 https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html[Debugging Information in Separate Files]
1036 for more information about build IDs.
1042 |Field name |Description
1045 |Base address of loaded library.
1051 `lttng_ust_statedump:debug_link`::
1052 Emitted when debug link information is found in a currently loaded
1054 https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html[Debugging Information in Separate Files]
1055 for more information about debug links.
1061 |Field name |Description
1064 |Base address of loaded library.
1067 |Debug link file's CRC.
1070 |Debug link file name.
1073 `lttng_ust_statedump:procname`::
1074 The process procname at process start.
1080 |Field name |Description
1089 Shared library load/unload tracking
1090 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1091 The <<state-dump,LTTng-UST state dump>> and the LTTng-UST helper library
1092 to instrument the dynamic linker (see man:liblttng-ust-dl(3)) can emit
1093 **shared library load/unload tracking** events.
1095 The following shared library load/unload tracking events exist and must
1096 be enabled to track the loading and unloading of shared libraries:
1098 `lttng_ust_lib:load`::
1099 Emitted when a shared library (shared object) is loaded.
1105 |Field name |Description
1108 |Base address of loaded library.
1111 |Size of loaded library in memory.
1114 |Path to loaded library file.
1117 |Whether or not the library has a build ID. If this field is 1, you
1118 can expect that an `lttng_ust_lib:build_id` event record follows
1119 this one (not necessarily immediately after).
1122 |Whether or not the library has debug link information. If this field
1123 is 1, you can expect that an `lttng_ust_lib:debug_link` event
1124 record follows this one (not necessarily immediately after).
1127 `lttng_ust_lib:unload`::
1128 Emitted when a shared library (shared object) is unloaded.
1134 |Field name |Description
1137 |Base address of unloaded library.
1140 `lttng_ust_lib:build_id`::
1141 Emitted when a build ID is found in a loaded shared library (shared
1143 https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html[Debugging Information in Separate Files]
1144 for more information about build IDs.
1150 |Field name |Description
1153 |Base address of loaded library.
1159 `lttng_ust_lib:debug_link`::
1160 Emitted when debug link information is found in a loaded
1161 shared library (shared object). See
1162 https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html[Debugging Information in Separate Files]
1163 for more information about debug links.
1169 |Field name |Description
1172 |Base address of loaded library.
1175 |Debug link file's CRC.
1178 |Debug link file name.
1182 Detect if LTTng-UST is loaded
1183 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1184 To detect if `liblttng-ust` is loaded from an application:
1186 . Define the `lttng_ust_loaded` weak symbol globally:
1188 ------------------------------------------------------------------------
1189 int lttng_ust_loaded __attribute__((weak));
1190 ------------------------------------------------------------------------
1192 This weak symbol is set by the constructor of `liblttng-ust`.
1194 . Test `lttng_ust_loaded` where needed:
1196 ------------------------------------------------------------------------
1199 if (lttng_ust_loaded) {
1200 /* LTTng-UST is loaded */
1202 /* LTTng-UST is NOT loaded */
1206 ------------------------------------------------------------------------
1212 NOTE: A few examples are available in the
1213 https://github.com/lttng/lttng-ust/tree/v{lttng_version}/doc/examples[`doc/examples`]
1214 directory of LTTng-UST's source tree.
1216 This example shows all the features documented in the previous
1217 sections. The <<build-static,static linking>> method is chosen here
1218 to link the application with the tracepoint provider.
1220 You can compile the source files and link them together statically
1227 $ cc -o app tp.o app.o -llttng-ust -ldl
1230 Using the man:lttng(1) tool, create an LTTng tracing session, enable
1231 all the events of this tracepoint provider, and start tracing:
1235 $ lttng create my-session
1236 $ lttng enable-event --userspace 'my_provider:*'
1240 You may also enable specific events:
1244 $ lttng enable-event --userspace my_provider:big_event
1245 $ lttng enable-event --userspace my_provider:event_instance2
1248 Run the application:
1252 $ ./app some arguments
1255 Stop the current tracing session and inspect the recorded events:
1264 Tracepoint provider header file
1265 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1268 ------------------------------------------------------------------------
1269 #undef LTTNG_UST_TRACEPOINT_PROVIDER
1270 #define LTTNG_UST_TRACEPOINT_PROVIDER my_provider
1272 #undef LTTNG_USTTRACEPOINT_INCLUDE
1273 #define LTTNG_USTTRACEPOINT_INCLUDE "./tp.h"
1275 #if !defined(_TP_H) || \
1276 defined(LTTNG_UST_TRACEPOINT_HEADER_MULTI_READ)
1279 #include <lttng/tracepoint.h>
1284 LTTNG_UST_TRACEPOINT_EVENT(
1288 int, my_integer_arg,
1289 const char *, my_string_arg
1291 LTTNG_UST_TP_FIELDS(
1292 lttng_ust_field_string(argc, my_string_arg)
1293 lttng_ust_field_integer(int, argv, my_integer_arg)
1297 LTTNG_UST_TRACEPOINT_ENUM(
1300 LTTNG_UST_TP_ENUM_VALUES(
1301 lttng_ust_field_enum_value("ZERO", 0)
1302 lttng_ust_field_enum_value("ONE", 1)
1303 lttng_ust_field_enum_value("TWO", 2)
1304 lttng_ust_field_enum_range("A RANGE", 52, 125)
1305 lttng_ust_field_enum_value("ONE THOUSAND", 1000)
1309 LTTNG_UST_TRACEPOINT_EVENT(
1313 int, my_integer_arg,
1314 const char *, my_string_arg,
1319 LTTNG_UST_TP_FIELDS(
1320 lttng_ust_field_integer(int, int_field1, my_integer_arg * 2)
1321 lttng_ust_field_integer_hex(long int, stream_pos,
1323 lttng_ust_field_float(double, float_field, flt_arg)
1324 lttng_ust_field_string(string_field, my_string_arg)
1325 lttng_ust_field_array(int, array_field, array_arg, 7)
1326 lttng_ust_field_array_text(char, array_text_field,
1328 lttng_ust_field_sequence(int, seq_field, array_arg, unsigned int,
1329 my_integer_arg / 10)
1330 lttng_ust_field_sequence_text(char, seq_text_field,
1331 array_arg, unsigned int,
1333 lttng_ust_field_enum(my_provider, my_enum, int,
1334 enum_field, array_arg[1])
1338 LTTNG_UST_TRACEPOINT_LOGLEVEL(my_provider, big_event,
1339 LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING)
1341 LTTNG_UST_TRACEPOINT_EVENT_CLASS(
1343 my_tracepoint_class,
1345 int, my_integer_arg,
1346 struct app_struct *, app_struct_arg
1348 LTTNG_UST_TP_FIELDS(
1349 lttng_ust_field_integer(int, a, my_integer_arg)
1350 lttng_ust_field_integer(unsigned long, b, app_struct_arg->b)
1351 lttng_ust_field_string(c, app_struct_arg->c)
1355 LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(
1357 my_tracepoint_class,
1361 int, my_integer_arg,
1362 struct app_struct *, app_struct_arg
1366 LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(
1368 my_tracepoint_class,
1372 int, my_integer_arg,
1373 struct app_struct *, app_struct_arg
1377 LTTNG_UST_TRACEPOINT_LOGLEVEL(my_provider, event_instance2,
1378 LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO)
1380 LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(
1382 my_tracepoint_class,
1386 int, my_integer_arg,
1387 struct app_struct *, app_struct_arg
1393 #include <lttng/tracepoint-event.h>
1394 ------------------------------------------------------------------------
1397 Tracepoint provider source file
1398 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1401 ------------------------------------------------------------------------
1402 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
1403 #define LTTNG_UST_TRACEPOINT_DEFINE
1406 ------------------------------------------------------------------------
1409 Application header file
1410 ~~~~~~~~~~~~~~~~~~~~~~~
1413 ------------------------------------------------------------------------
1424 ------------------------------------------------------------------------
1427 Application source file
1428 ~~~~~~~~~~~~~~~~~~~~~~~
1431 ------------------------------------------------------------------------
1438 static int array_of_ints[] = {
1439 100, -35, 1, 23, 14, -6, 28, 1001, -3000,
1442 int main(int argc, char* argv[])
1445 struct app_struct app_struct;
1447 lttng_ust_tracepoint(my_provider, simple_event, argc, argv[0]);
1448 stream = fopen("/tmp/app.txt", "w");
1452 "Error: Cannot open /tmp/app.txt for writing\n");
1453 return EXIT_FAILURE;
1456 if (fprintf(stream, "0123456789") != 10) {
1458 fprintf(stderr, "Error: Cannot write to /tmp/app.txt\n");
1459 return EXIT_FAILURE;
1462 lttng_ust_tracepoint(my_provider, big_event, 35,
1463 "hello tracepoint", stream, -3.14,
1466 app_struct.b = argc;
1467 app_struct.c = "[the string]";
1468 lttng_ust_tracepoint(my_provider, event_instance1, 23,
1470 app_struct.b = argc * 5;
1471 app_struct.c = "[other string]";
1472 lttng_ust_tracepoint(my_provider, event_instance2, 17,
1475 app_struct.c = "nothing";
1476 lttng_ust_tracepoint(my_provider, event_instance3, -52,
1478 return EXIT_SUCCESS;
1480 ------------------------------------------------------------------------
1483 ENVIRONMENT VARIABLES
1484 ---------------------
1485 `LTTNG_UST_APP_PATH`::
1486 Path under which unix sockets used for the communication between
1487 the application (tracee) instrumented with `liblttng-ust` and the
1488 LTTng session and consumer daemons (part of the LTTng-tools project)
1489 are located. When `$LTTNG_UST_APP_PATH` is specified, only this path
1490 is considered for connecting to a session daemon. The
1491 `$LTTNG_UST_APP_PATH` target directory must exist and be accessible
1492 by the user before the application is executed for tracing to work.
1493 Setting this environment variable disables connection to root and
1494 per-user session daemons.
1497 Alternative user's home directory. This variable is useful when the
1498 user running the instrumented application has a non-writable home
1499 directory. This path is where unix sockets for communication with
1500 the per-user session daemon are located.
1502 `LTTNG_UST_ALLOW_BLOCKING`::
1503 If set, allow the application to retry event tracing when there's
1504 no space left for the event record in the sub-buffer, therefore
1505 effectively blocking the application until space is made available
1506 or the configured timeout is reached.
1508 To allow an application to block during tracing, you also need to
1509 specify a blocking timeout when you create a channel with the
1510 nloption:--blocking-timeout option of the man:lttng-enable-channel(1)
1513 This option can be useful in workloads generating very large trace data
1514 throughput, where blocking the application is an acceptable trade-off to
1515 prevent discarding event records.
1517 WARNING: Setting this environment variable may significantly
1518 affect application timings.
1520 `LTTNG_UST_ABORT_ON_CRITICAL`::
1521 If set, abort the instrumented application on a critical error message.
1523 `LTTNG_UST_CLOCK_PLUGIN`::
1524 Path to the shared object which acts as the clock override plugin.
1525 An example of such a plugin can be found in the LTTng-UST
1527 https://github.com/lttng/lttng-ust/tree/v{lttng_version}/doc/examples/clock-override[`examples/clock-override`].
1530 If set, enable `liblttng-ust`'s debug and error output.
1532 `LTTNG_UST_GETCPU_PLUGIN`::
1533 Path to the shared object which acts as the `getcpu()` override
1534 plugin. An example of such a plugin can be found in the LTTng-UST
1536 https://github.com/lttng/lttng-ust/tree/v{lttng_version}/doc/examples/getcpu-override[`examples/getcpu-override`].
1538 `LTTNG_UST_REGISTER_TIMEOUT`::
1539 Waiting time for the _registration done_ session daemon command
1540 before proceeding to execute the main program (milliseconds).
1542 The value `0` means _do not wait_. The value `-1` means _wait forever_.
1543 Setting this environment variable to `0` is recommended for applications
1544 with time constraints on the process startup time.
1548 `LTTNG_UST_WITHOUT_BADDR_STATEDUMP`::
1549 If set, prevents `liblttng-ust` from performing a base address state
1550 dump (see the <<state-dump,LTTng-UST state dump>> section above).
1552 `LTTNG_UST_WITHOUT_PROCNAME_STATEDUMP`::
1553 If set, prevents `liblttng-ust` from performing a procname state
1554 dump (see the <<state-dump,LTTng-UST state dump>> section above).
1557 include::common-footer.txt[]
1559 include::common-copyrights.txt[]
1561 include::common-authors.txt[]
1566 man:lttng_ust_tracef(3),
1567 man:lttng_ust_tracelog(3),
1568 man:lttng-gen-tp(1),
1569 man:lttng-ust-dl(3),
1570 man:lttng-ust-cyg-profile(3),
1572 man:lttng-enable-event(1),
1574 man:lttng-add-context(1),