Initial import
[lttng-docs.git] / contents / using-lttng / instrumenting / c-application / lttng-ust-environment-variables-compiler-flags.md
CommitLineData
5e0cbfb0
PP
1---
2id: lttng-ust-environment-variables-compiler-flags
3---
4
5A few special environment variables and compile flags may affect the
6behavior of LTTng-UST.
7
8LTTng-UST's debugging can be activated by setting the environment
9variable `LTTNG_UST_DEBUG` to `1` when launching the application. It
10can also be enabled at compile time by defining `LTTNG_UST_DEBUG` when
11compiling LTTng-UST (using the `-DLTTNG_UST_DEBUG` compiler option).
12
13The environment variable `LTTNG_UST_REGISTER_TIMEOUT` can be used to
14specify how long the application should wait for the
15[session daemon](#doc-lttng-sessiond)'s _registration done_ command
16before proceeding to execute the main program. The timeout value is
17specified in milliseconds. 0 means _don't wait_. -1 means
18_wait forever_. Setting this environment variable to 0 is recommended
19for applications with time contraints on the process startup time.
20
21The default value of `LTTNG_UST_REGISTER_TIMEOUT` (when not defined)
22is **3000 ms**.
23
24The compilation definition `LTTNG_UST_DEBUG_VALGRIND` should be enabled
25at build time (`-DLTTNG_UST_DEBUG_VALGRIND`) to allow `liblttng-ust`
26to be used with <a href="http://valgrind.org/" class="ext">Valgrind</a>.
27The side effect of defining `LTTNG_UST_DEBUG_VALGRIND` is that per-CPU
28buffering is disabled.
This page took 0.038612 seconds and 4 git commands to generate.