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.
|===
+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
-------