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.
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 */
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 */
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 */
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 */
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 */