7 #include <ltt/ltt-facility-user_generic.h>
8 #include <ltt/ltt-facility-custom-user_generic.h>
9 // Notice the inclusion of ltt-facility-custom-user_generic.h for the
10 // slow_printf support
13 int main(int argc
, char **argv
)
15 printf("Will trace a printf of an incrementing counter.\n");
16 printf("Abort with CTRL-C.\n");
17 printf("No file is created with this example : it logs through a kernel\n");
18 printf("system call. See the LTTng lttctl command to start tracing.\n");
20 unsigned int count
= 0;
23 trace_user_generic_slow_printf("in: %s at: %s:%d: Counter value is: %u.",
24 __FILE__
, __func__
, __LINE__
, count
);
This page took 0.032198 seconds and 4 git commands to generate.