new ltt-usertrace
[lttv.git] / ltt-usertrace / sample.c
1
2 #include <stdio.h>
3 #include <unistd.h>
4
5 #define LTT_TRACE
6 #define LTT_BLOCKING 1
7 #include <ltt/ltt-facility-user_generic.h>
8
9
10 int main(int argc, char **argv)
11 {
12 printf("Will trace the following string : Hello world! Have a nice day.\n");
13 printf("Abort with CTRL-C.\n");
14 printf("No file is created with this example : it logs through a kernel\n");
15 printf("system call. See the LTTng lttctl command to start tracing.\n");
16
17 while(1) {
18 trace_user_generic_string("Hello world! Have a nice day.");
19 sleep(1);
20 }
21
22 return 0;
23 }
24
This page took 0.030877 seconds and 4 git commands to generate.