From 987daa894960b79ca6b9fe2703e473fdf2efe768 Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 9 Mar 2006 21:05:29 +0000 Subject: [PATCH] new ltt-usertrace git-svn-id: http://ltt.polymtl.ca/svn@1644 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt-usertrace/sample-highspeed.c | 4 +++- ltt-usertrace/sample-instrument-fct.c | 4 ++++ ltt-usertrace/sample-printf.c | 6 ++++++ ltt-usertrace/sample.c | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ltt-usertrace/sample-highspeed.c b/ltt-usertrace/sample-highspeed.c index 963a83a7..3f249d3f 100644 --- a/ltt-usertrace/sample-highspeed.c +++ b/ltt-usertrace/sample-highspeed.c @@ -9,7 +9,9 @@ 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!"); diff --git a/ltt-usertrace/sample-instrument-fct.c b/ltt-usertrace/sample-instrument-fct.c index 2bc6cd5d..2881adc2 100644 --- a/ltt-usertrace/sample-instrument-fct.c +++ b/ltt-usertrace/sample-instrument-fct.c @@ -14,6 +14,10 @@ void test_function(void) 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); diff --git a/ltt-usertrace/sample-printf.c b/ltt-usertrace/sample-printf.c index 85fd6507..9b2292a7 100644 --- a/ltt-usertrace/sample-printf.c +++ b/ltt-usertrace/sample-printf.c @@ -6,11 +6,17 @@ #define LTT_BLOCKING 1 #include #include +// 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) { diff --git a/ltt-usertrace/sample.c b/ltt-usertrace/sample.c index efe4110b..d6452525 100644 --- a/ltt-usertrace/sample.c +++ b/ltt-usertrace/sample.c @@ -10,6 +10,9 @@ 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."); -- 2.34.1