X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fman%2Ftracef.3.txt;h=2894ca455af39e99c5d587dfd88272aab45a6cf0;hb=cfd56ee1736677d06db86593a8555275ac4bc2ec;hp=7cab981478b0eb19ee83faa0ce448ec4c9cb723c;hpb=0810c65b69a2b2f18d1c2f0e32c3d9ab92a49867;p=lttng-ust.git diff --git a/doc/man/tracef.3.txt b/doc/man/tracef.3.txt index 7cab9814..2894ca45 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,6 +15,7 @@ SYNOPSIS [verse] #define *tracef*('fmt', ...) +#define *vtracef*('fmt', 'va_list' ap) Link with `-llttng-ust`. @@ -26,11 +27,11 @@ 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'. -To use `tracef()`, include `` where you need it, and -link your application with `liblttng-ust`. See the <> +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()` calls and +Once your application is instrumented with `tracef()` or `vtracef()` calls and ready to run, use man:lttng-enable-event(1) to enable the `lttng_ust_tracef:*` event. @@ -41,7 +42,7 @@ If you need to attach a specific log level to a `tracef()` call, use man:tracelog(3) instead. See also the <> section below for important -limitations to consider when using `tracef()`. +limitations to consider when using `tracef()` or `vtracef()`. [[example]] @@ -69,34 +70,34 @@ This C source file, saved as `app.c`, can be compiled into a program like this: [role="term"] ---------------------------- -cc -o app app.c -llttng-ust ---------------------------- +---- +$ cc -o app app.c -llttng-ust +---- You can create an LTTng tracing session, enable the `tracef()` events, and start the created tracing session like this: [role="term"] ---------------------------------------------------- -lttng create my-session -lttng enable-event --userspace 'lttng_ust_tracef:*' -lttng start ---------------------------------------------------- +---- +$ lttng create my-session +$ lttng enable-event --userspace 'lttng_ust_tracef:*' +$ lttng start +---- Next, start the program to be traced: [role="term"] ------ -./app ------ +---- +$ ./app +---- Finally, stop the tracing session, and inspect the recorded events: [role="term"] ----------- -lttng stop -lttng view ----------- +---- +$ lttng stop +$ lttng view +---- [[limitations]]