X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=doc%2Fman%2Flttng-ust.3.txt;h=9fd3e8b8035f2a728e700007f03e475a06547f0d;hb=273554e4e1c9747afc2b0911fd0d124708720cea;hp=3159d6278e491a9eee06cbfa2d9b2e1186f60775;hpb=5a75458c4c41b479f2dcb21f966979a2c8e2279e;p=lttng-ust.git diff --git a/doc/man/lttng-ust.3.txt b/doc/man/lttng-ust.3.txt index 3159d627..9fd3e8b8 100644 --- a/doc/man/lttng-ust.3.txt +++ b/doc/man/lttng-ust.3.txt @@ -769,12 +769,16 @@ information about event filtering. reverse-lookup the source location that caused the event to be emitted. -+perf:thread:COUNTER+:: +`perf:thread:COUNTER`:: perf counter named 'COUNTER'. Use `lttng add-context --list` to list the available perf counters. + Only available on IA-32 and x86-64 architectures. +`perf:thread:raw:rN:NAME`:: + perf counter with raw ID 'N' and custom name 'NAME'. See + man:lttng-add-context(1) for more details. + `pthread_id`:: POSIX thread identifier. Can be used on architectures where `pthread_t` maps nicely to an `unsigned long` type. @@ -987,6 +991,33 @@ Fields: |=== +Detect if LTTng-UST is loaded +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To detect if `liblttng-ust` is loaded from an application: + +. Define the `lttng_ust_loaded` weak symbol globally: ++ +------------------------------------------------------------------------ +int lttng_ust_loaded __attribute__((weak)); +------------------------------------------------------------------------ ++ +This weak symbol is set by the constructor of `liblttng-ust`. + +. Test `lttng_ust_loaded` where needed: ++ +------------------------------------------------------------------------ +/* ... */ + +if (lttng_ust_loaded) { + /* LTTng-UST is loaded */ +} else { + /* LTTng-UST is NOT loaded */ +} + +/* ... */ +------------------------------------------------------------------------ + + [[example]] EXAMPLE -------