fix compact events
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 12 Oct 2007 13:22:09 +0000 (13:22 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 12 Oct 2007 13:22:09 +0000 (13:22 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2669 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/trace.h
ltt/branches/poly/ltt/tracefile.c

index 05a8133caacf56f7ab4c5ee779043ff60ee40b49..6e1cea173fafc07263a28a40008d9e0f51050485 100644 (file)
@@ -42,7 +42,6 @@ struct LttTrace {
   uint64_t  start_monotonic;
   LttTime   start_time;
   LttTime   start_time_from_tsc;
-  uint8_t   compact_event_bits;
 
   GData     *tracefiles;                    //tracefiles groups
   /* Support for markers */
index d37c694d6b0349af5120a89ebf1dc27724a2bcdd..19e0f1cd71dec693360b2ccf6a36f061ce643628 100644 (file)
@@ -1769,7 +1769,7 @@ static void print_debug_event_header(LttEvent *ev, void *start_pos, void *end_po
        if (offset + ((i * 4) + j) <
                (long)end_pos - (long)start_pos)
           g_printf("%02hhX",
-            ((char*)ev->tracefile->buffer.head)[ev->offset + offset + ((i * 4) + j)]);
+            ((char*)start_pos)[offset + ((i * 4) + j)]);
        else
          g_printf("  ");
         g_printf(" ");
@@ -1828,9 +1828,9 @@ int ltt_tracefile_read_update_event(LttTracefile *tf)
       /* We keep the LSB of the previous timestamp, to make sure
        * we never go back */
       event->event_id = event->timestamp >> tf->tscbits;
-      event->event_id = event->event_id & ((1 << tf->trace->compact_event_bits) - 1);
+      event->event_id = event->event_id & ((1 << tf->compact_event_bits) - 1);
       event->compact_data = event->timestamp >> 
-        (tf->trace->compact_event_bits + tf->tscbits);
+        (tf->compact_event_bits + tf->tscbits);
       //printf("tsc bits %u, ev bits %u init data %u\n",
       //  tf->tscbits, tf->trace->compact_event_bits, event->compact_data);
       /* Put the compact data back in original endianness */
This page took 0.025899 seconds and 4 git commands to generate.