hook by ID optimisation for incoming 10k index size : 256 facilities * 10 events...
[lttv.git] / ltt / branches / poly / ltt / convert / convert.c
index 3f7bc1415fbf3d69d7ad9281a3409312f9899712..5f2de35fb5dc9902143700e98ccffc1841e199e8 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -111,7 +115,7 @@ int main(int argc, char ** argv){
   int  ltt_major_version=0;
   int  ltt_minor_version=0;
   int  ltt_log_cpu;
-  guint ltt_trace_start_size;
+  guint ltt_trace_start_size = 0;
   char buf[BUFFER_SIZE];
   int i, k;
 
@@ -298,7 +302,7 @@ int main(int argc, char ** argv){
     cur_pos += sizeof(uint32_t); //skip time delta
     tStart = (trace_start_any*)cur_pos;
     if(tStart->MagicNumber != TRACER_MAGIC_NUMBER)
-      g_error("Trace magic number does not match : %lx, should be %lx",
+      g_error("Trace magic number does not match : %x, should be %x",
                tStart->MagicNumber, TRACER_MAGIC_NUMBER);
     if(tStart->MajorVersion != TRACER_SUP_VERSION_MAJOR)
       g_error("Trace Major number does match : %hu, should be %u",
@@ -346,11 +350,11 @@ int main(int argc, char ** argv){
       ltt_trace_start_size = sizeof(trace_start_2_3);
     /* We do not use the flight recorder information for now, because we
      * never use the .proc file anyway */
-    } else {
-      ltt_trace_start_size = 0;
+    }
+    
+    if(ltt_trace_start_size == 0) 
       g_error("Minor version unknown : %hu. Supported minors : 2, 3",
                tStart->MinorVersion);
-    }
 
     block_size = ltt_block_size;//FIXME
     block_number = file_size/ltt_block_size;
This page took 0.023128 seconds and 4 git commands to generate.