move ltt-usertrace to attic
[lttv.git] / trunk / attic / ltt-usertrace / sample.c
diff --git a/trunk/attic/ltt-usertrace/sample.c b/trunk/attic/ltt-usertrace/sample.c
new file mode 100644 (file)
index 0000000..70bb8a2
--- /dev/null
@@ -0,0 +1,25 @@
+
+#include <stdio.h>
+#include <unistd.h>
+
+#define LTT_TRACE
+#define LTT_BLOCKING 1
+#include <ltt/ltt-facility-user_generic.h>
+
+
+int main(int argc, char **argv)
+{
+       printf("Will trace the following string : \"Hello world! Have a nice day.\"\n");
+       printf("every second.\n");
+       printf("Abort with CTRL-C.\n");
+       printf("No file is created with this example : it logs through a kernel\n");
+       printf("system call. See the LTTng lttctl command to start tracing.\n");
+
+       while(1) {
+               trace_user_generic_string("Hello world! Have a nice day.");
+               sleep(1);
+       }
+       
+       return 0;
+}
+
This page took 0.02268 seconds and 4 git commands to generate.