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