new ltt-usertrace
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 9 Mar 2006 22:18:50 +0000 (22:18 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 9 Mar 2006 22:18:50 +0000 (22:18 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1651 04897980-b3bd-0310-b5e0-8ef037075253

ltt-usertrace/Makefile
ltt-usertrace/ltt-usertrace-fast.c
ltt-usertrace/sample-thread-fast.c

index aebde690e65b33669afc7456d15fd960dca2b142..f15bc5ca397e76349d6cea2cee7e905f8047ebcd 100644 (file)
@@ -4,7 +4,7 @@ INCLUDE_DIR=/usr/include
 LIB_DIR=/usr/lib
 RANLIB=ranlib
 
-CFLAGS=-I. -O3 -L.
+CFLAGS=-I. -O2 -L.
 
 #For testing lib ltt-usertrace-fast
 #CFLAGS+=-DLTT_SUBBUF_SIZE_CPU=134217728
index 28a0ed0e404d2a80ab4af7eb499435ad513d73d0..a0544b67d57b407e7ddc985fa317346ae3a3d432 100644 (file)
@@ -74,7 +74,7 @@ _syscall0(pid_t,gettid)
 #include <ltt/ltt-usertrace.h>
 
 #ifdef LTT_SHOW_DEBUG
-#define dbg_printf(...) dbg_printf(__VA_ARGS__)
+#define dbg_printf(...) printf(__VA_ARGS__)
 #else
 #define dbg_printf(...)
 #endif //LTT_SHOW_DEBUG
@@ -376,14 +376,12 @@ get_error:
 static void ltt_usertrace_fast_daemon(struct ltt_trace_info *shared_trace_info,
                sigset_t oldset, pid_t l_traced_pid, pthread_t l_traced_tid)
 {
-       sigset_t set;
        struct sigaction act;
        int ret;
        int fd_process;
        char outfile_name[PATH_MAX];
        char identifier_name[PATH_MAX];
 
-
        traced_pid = l_traced_pid;
        traced_tid = l_traced_tid;
 
@@ -431,7 +429,7 @@ static void ltt_usertrace_fast_daemon(struct ltt_trace_info *shared_trace_info,
        if(ret != -1) {
                perror("LTT Error in sigsuspend\n");
        }
-       if(traced_pid == 0 || parent_exited) goto dead_parent;
+       if((traced_pid == 0) || parent_exited) goto dead_parent;
 
 #ifndef LTT_NULL_OUTPUT_TEST
        fd_process = creat(outfile_name, 0644);
@@ -455,6 +453,7 @@ static void ltt_usertrace_fast_daemon(struct ltt_trace_info *shared_trace_info,
                do {
                        ret = read_subbuffer(&shared_trace_info->channel.process, fd_process);
                } while(ret == 0);
+
                ret = sigsuspend(&oldset);
                if(ret != -1) {
                        perror("LTT Error in sigsuspend\n");
@@ -528,7 +527,6 @@ void ltt_rw_init(void)
     dbg_printf("LTT Error in sigfillset\n");
   } 
        
-       
   ret = pthread_sigmask(SIG_BLOCK, &set, &oldset);
   if(ret) {
     dbg_printf("LTT Error in pthread_sigmask\n");
index 46ffbd12ff3f5b27df1e307763204cf6e37fd1c0..6376f37675894ae81cb1f03fe47f1a5996805de2 100644 (file)
@@ -31,7 +31,7 @@ void *thr2(void *arg)
        printf("thread 2, thread id : %lu, pid %lu\n", pthread_self(), getpid());
 
        for(i=0; i<100000; i++) {
-               trace_user_generic_string("Hello world! Have a nice day.");
+//             trace_user_generic_string("Hello world! Have a nice day.");
        }
        /* This thread is a bad citizen : returning like this will cause its cancel
         * routines not to be executed. This is still detected by the tracer, but only
This page took 0.026597 seconds and 4 git commands to generate.