+// SPDX-FileCopyrightText: 2016 Philippe Proulx <pproulx@efficios.com>
+// SPDX-License-Identifier: CC-BY-4.0
+//
lttng-ust(3)
============
:object-type: library
`lttng_ust_do_tracepoint()` have a `STAP_PROBEV()` call, so if you need
it, you should emit this call yourself.
+Tracing in C/C++ constructors and destructors
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+As of LTTng-UST{nbsp}2.13, tracepoint definitions are implemented using
+compound literals. In the following cases, those compound literals are
+allocated on the heap:
+
+* g++{nbsp}<=={nbsp}4.8 is used as the compiler or,
+* `LTTNG_UST_ALLOCATE_COMPOUND_LITERAL_ON_HEAP` is defined in the C pre-processor flags
+and the application is compiled with a C++ compiler
+
+When the compound literals are heap-allocated, there are some cases in which
+both C-style and C++ constructors and destructors will not be traced.
+
+1. C-style constructors and destructors in statically linked archives
+2. C-style constructors and destructors in the application itself
+3. Some C++-style constructors and destructors in the application and statically linked archives
+
+In the 3rd case above, which C++-style constructors and destructors will not be traced depends
+on the initialization order within each translation unit and across the entire program when
+all translation units are linked together.
[[build-static]]
Statically linking the tracepoint provider
lttng_ust_field_array(int, array_field, array_arg, 7)
lttng_ust_field_array_text(char, array_text_field,
array_arg, 5)
- lttng_ust_field_sequence(int, seq_field, array_arg, int,
+ lttng_ust_field_sequence(int, seq_field, array_arg, unsigned int,
my_integer_arg / 10)
lttng_ust_field_sequence_text(char, seq_text_field,
- array_arg, int,
+ array_arg, unsigned int,
my_integer_arg / 5)
lttng_ust_field_enum(my_provider, my_enum, int,
enum_field, array_arg[1])
ENVIRONMENT VARIABLES
---------------------
-`LTTNG_UST_HOME`::
+`LTTNG_UST_APP_PATH`::
+ Path under which unix sockets used for the communication between
+ the application (tracee) instrumented with `liblttng-ust` and the
+ LTTng session and consumer daemons (part of the LTTng-tools project)
+ are located. When `$LTTNG_UST_APP_PATH` is specified, only this path
+ is considered for connecting to a session daemon. The
+ `$LTTNG_UST_APP_PATH` target directory must exist and be accessible
+ by the user before the application is executed for tracing to work.
+ Setting this environment variable disables connection to root and
+ per-user session daemons.
+
+`LTTNG_HOME`::
Alternative user's home directory. This variable is useful when the
user running the instrumented application has a non-writable home
- directory.
-+
-Unix sockets used for the communication between `liblttng-ust` and the
-LTTng session and consumer daemons (part of the LTTng-tools project)
-are located in a specific directory under `$LTTNG_UST_HOME` (or `$HOME` if
-`$LTTNG_UST_HOME` is not set).
-
-NOTE: `$LTTNG_HOME` is also supported as a fallback of `$LTTNG_UST_HOME` for
-backward compatibility reason.
+ directory. This path is where unix sockets for communication with
+ the per-user session daemon are located.
`LTTNG_UST_ALLOW_BLOCKING`::
If set, allow the application to retry event tracing when there's