int main(int argc, char **argv)
{
- printf("Will trace the following string : Running fast! in a infinite loop.\n");
+ printf("Will trace the following string : Running fast! in an infinite loop.\n");
+ printf("Abort with CTRL-C or it will quickly fill up your disk.\n");
+ printf("See the result file in /tmp/ltt-usertraces.\n");
while(1) {
trace_user_generic_string("Running fast!");
int main(int argc, char **argv)
{
+ printf("Abort with CTRL-C.\n");
+ printf("See the result file in /tmp/ltt-usertraces.\n");
+
+
while(1) {
test_function();
sleep(1);
#define LTT_BLOCKING 1
#include <ltt/ltt-facility-user_generic.h>
#include <ltt/ltt-facility-custom-user_generic.h>
+// Notice the inclusion of ltt-facility-custom-user_generic.h for the
+// slow_printf support
int main(int argc, char **argv)
{
printf("Will trace a printf of an incrementing counter.\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");
+
unsigned int count = 0;
while(1) {
int main(int argc, char **argv)
{
printf("Will trace the following string : Hello world! Have a nice day.\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.");