X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=doc%2Fman%2Ftracef.3.txt;h=21456add358213d6104493841d3c17844e28f7be;hb=e436e84d48332d559fe60c1a5eba81f03e9f38f9;hp=1068afadfef56b6e7f0256adfe196d885a280246;hpb=636cf2a01500b8bef5a5959b4f1d3a9a7222b39a;p=lttng-ust.git diff --git a/doc/man/tracef.3.txt b/doc/man/tracef.3.txt index 1068afad..21456add 100644 --- a/doc/man/tracef.3.txt +++ b/doc/man/tracef.3.txt @@ -5,7 +5,7 @@ tracef(3) NAME ---- -tracef - LTTng-UST printf(3)-like interface +tracef, vtracef - LTTng-UST printf(3)-like interface SYNOPSIS @@ -15,33 +15,43 @@ SYNOPSIS [verse] #define *tracef*('fmt', ...) +#define *vtracef*('fmt', 'ap') -Link with `-llttng-ust`. +Link with `-llttng-ust -llttng-ust-common`. DESCRIPTION ----------- -The LTTng-UST `tracef()` API allows you to trace your application with -the help of a simple man:printf(3)-like macro. The 'fmt' argument is -passed directly to the 'fmt' parameter of man:vasprintf(3), as well as -the optional parameters following 'fmt'. +The LTTng-UST `tracef()` and `vtracef()` API allows you to trace your +application with the help of simple man:printf(3)-like and +man:vprintf(3)-like macros. -To use `tracef()`, include `` where you need it, and -link your application with `liblttng-ust`. See the <> -section below for a complete usage example. +The 'fmt' argument is passed directly as the 'fmt' parameter of +man:vasprintf(3), as well as: -Once your application is instrumented with `tracef()` calls and -ready to run, use man:lttng-enable-event(1) to enable the +For `tracef()`:: + The optional parameters following 'fmt'. + +For `vtracef()`:: + The 'ap' parameter as the 'ap' parameter of man:vasprintf(3) + (`va_list` type). + +To use `tracef()` or `vtracef()`, include `` where you +need it, and link your application with `liblttng-ust`. See the +<> section below for a complete usage example. + +Once your application is instrumented with `tracef()` and/or `vtracef()` +calls and ready to run, use man:lttng-enable-event(1) to enable the `lttng_ust_tracef:*` event. -The `tracef()` events contain a single field, named `msg`, which is the -formatted string output. +The `tracef()` and `vtracef()` events contain a single field, named +`msg`, which is the formatted string output. -If you need to attach a specific log level to a `tracef()` call, use -man:tracelog(3) instead. +If you need to attach a specific log level to a `tracef()`/`vtracef()` +call, use man:tracelog(3) and man:vtracelog(3) instead. See also the <> section below for important -limitations to consider when using `tracef()`. +limitations to consider when using `tracef()` or `vtracef()`. [[example]] @@ -70,7 +80,7 @@ like this: [role="term"] ---- -$ cc -o app app.c -llttng-ust +$ cc -o app app.c -llttng-ust -llttng-ust-common ---- You can create an LTTng tracing session, enable the `tracef()` events, @@ -117,6 +127,7 @@ include::common-authors.txt[] SEE ALSO -------- man:tracelog(3), +man:vtracelog(3), man:lttng-ust(3), man:lttng(1), man:printf(3)