add usertrace-fast
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 7 Mar 2006 15:43:13 +0000 (15:43 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 7 Mar 2006 15:43:13 +0000 (15:43 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1606 04897980-b3bd-0310-b5e0-8ef037075253

usertrace-fast/Makefile
usertrace-fast/ltt-usertrace-fast.c
usertrace-fast/ltt-usertrace-fast.h
usertrace-fast/test.c

index 83c3b89f40d5aa71361f2dfb4dffb50021aaad00..6cfaec6ab9f6e57c112ce699ef757fb694ae28f9 100644 (file)
@@ -2,7 +2,7 @@
 
 CC=gcc
 
-test: test.c lttng_usertrace.c
+test: test.c ltt-usertrace-fast.c
        $(CC) $(CFLAGS) -lpthread -o $@ $^
 
 .PHONY : clean
index f910e06941cffd3cec3cd2d50bfb9b61e36405fe..42dde3e50695f53fd73448a4bfcd1856fe1b9777 100644 (file)
@@ -18,7 +18,7 @@
 #include <malloc.h>
 #include <string.h>
 
-#include "ltt_usertrace.h"
+#include "ltt-usertrace-fast.h"
 
 /* TLS for the trace buffer
  * http://www.dis.com/gnu/gcc/C--98-Thread-Local-Edits.html
@@ -71,7 +71,7 @@ void __attribute__((constructor)) __ltt_usertrace_fast_init(void)
 
   printf("LTTng usertrace-fast init\n");
 
-
+       ltt_thread_init();
 
 }
 
index a740a832b3a46079068ca73cdc4fafbe2160d8f5..ac509c24a8933bf19bbac5b57b3f3f3cd03a0506 100644 (file)
@@ -29,6 +29,7 @@ struct ltt_buf {
 
 struct lttng_trace_info {
        struct _pthread_cleanup_buffer cleanup;
+       int init;
        int filter;
        atomic_t nesting;
        struct {
index 33937f3bef418daa8a4b6e18df5d6ae50c3bd810..2bd12e130adcf413e6b4c9b628301da1958d5a70 100644 (file)
@@ -4,12 +4,13 @@
 #include <unistd.h>
 #include <stdlib.h>
 
-#include "lttng_usertrace.h"
+#include "ltt-usertrace-fast.h"
 
 
 
 void *thr1(void *arg)
 {
+       ltt_thread_init();
   printf("thread 1, thread id : %lu, pid %lu\n", pthread_self(), getpid());
 
   while(1) {}
@@ -20,6 +21,7 @@ void *thr1(void *arg)
 
 void *thr2(void *arg)
 {
+       ltt_thread_init();
   while(1) {
     printf("thread 2, thread id : %lu, pid %lu\n", pthread_self(), getpid());
     sleep(2);
This page took 0.025451 seconds and 4 git commands to generate.