thread fix
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 8 Mar 2006 21:06:26 +0000 (21:06 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 8 Mar 2006 21:06:26 +0000 (21:06 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1622 04897980-b3bd-0310-b5e0-8ef037075253

genevent-new/genevent.c
usertrace-generic/ltt/ltt-facility-user_generic.h

index c62459c36572e9f6d4c7053fbf5762d1f1a3d2df..7408b7e519beaba19c2d155bd1223cba6e81ac62 100644 (file)
@@ -1905,7 +1905,13 @@ int print_event_logging_function_user_fast(char *basename, facility_t *fac,
        fprintf(fd, "\n");
        
        print_tabs(1, fd);
-       fprintf(fd, "if(!trace) ltt_thread_init();\n");
+       fprintf(fd, "if(!trace) {\n");
+       print_tabs(2, fd);
+       fprintf(fd, "ltt_thread_init();\n");
+       print_tabs(2, fd);
+       fprintf(fd, "trace = thread_trace_info;\n");
+       print_tabs(1, fd);
+       fprintf(fd, "}\n\n");
        fprintf(fd, "\n");
 
        /* Calculate event variable len + event data alignment offset.
index d6a0e3013be34eb2309161a9ad329b0c01549c82..94a636dc8297398b944bd413ab7f155a84b269ba 100644 (file)
@@ -132,7 +132,11 @@ static inline int trace_user_generic_string(
        uint64_t tsc;
        size_t before_hdr_pad, after_hdr_pad, header_size;
 
-       if(!trace) ltt_thread_init();
+       if(!trace) {
+               ltt_thread_init();
+               trace = thread_trace_info;
+       }
+
 
        /* For each field, calculate the field size. */
        /* size = *to_base + *to + *len */
@@ -340,7 +344,11 @@ static inline int trace_user_generic_string_pointer(
        uint64_t tsc;
        size_t before_hdr_pad, after_hdr_pad, header_size;
 
-       if(!trace) ltt_thread_init();
+       if(!trace) {
+               ltt_thread_init();
+               trace = thread_trace_info;
+       }
+
 
        /* For each field, calculate the field size. */
        /* size = *to_base + *to + *len */
@@ -511,7 +519,11 @@ static inline int trace_user_generic_slow_printf(
        uint64_t tsc;
        size_t before_hdr_pad, after_hdr_pad, header_size;
 
-       if(!trace) ltt_thread_init();
+       if(!trace) {
+               ltt_thread_init();
+               trace = thread_trace_info;
+       }
+
 
        /* For each field, calculate the field size. */
        /* size = *to_base + *to + *len */
@@ -692,7 +704,11 @@ static inline __attribute__((no_instrument_function)) int trace_user_generic_fun
        uint64_t tsc;
        size_t before_hdr_pad, after_hdr_pad, header_size;
 
-       if(!trace) ltt_thread_init();
+       if(!trace) {
+               ltt_thread_init();
+               trace = thread_trace_info;
+       }
+
 
        /* For each field, calculate the field size. */
        /* size = *to_base + *to + *len */
@@ -918,7 +934,11 @@ static inline __attribute__((no_instrument_function)) int trace_user_generic_fun
        uint64_t tsc;
        size_t before_hdr_pad, after_hdr_pad, header_size;
 
-       if(!trace) ltt_thread_init();
+       if(!trace) {
+               ltt_thread_init();
+               trace = thread_trace_info;
+       }
+
 
        /* For each field, calculate the field size. */
        /* size = *to_base + *to + *len */
This page took 0.02622 seconds and 4 git commands to generate.