add compact event field
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 12 Oct 2007 12:30:21 +0000 (12:30 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 12 Oct 2007 12:30:21 +0000 (12:30 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2668 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/ltt-private.h
ltt/branches/poly/ltt/tracefile.c

index c255916cb6bf5ad95c177d696e4dadffbabecd32..3cbb9bf26380f8f10bd19e2695c60099b966c12f 100644 (file)
@@ -147,6 +147,7 @@ struct ltt_trace_header_1_0 {
   uint8_t         alignment;  /* Event header alignment */
   uint8_t         tsc_lsb_truncate;
   uint8_t         tscbits;
+  uint8_t         compact_data_shift;
   uint32_t        freq_scale;
   uint64_t        start_freq;
   uint64_t        start_tsc;
@@ -295,6 +296,7 @@ struct LttTracefile {
   uint8_t   tsc_lsb_truncate;
   uint8_t   tscbits;
   uint8_t   tsc_msb_cutoff;
+  uint8_t   compact_event_bits;
   uint64_t  tsc_mask;
   uint64_t  tsc_mask_next_bit;       //next MSB after the mask
 
index e6e06987feafcfe3fabf975894c84e89f202086a..d37c694d6b0349af5120a89ebf1dc27724a2bcdd 100644 (file)
@@ -274,6 +274,7 @@ int parse_trace_header(void *header, LttTracefile *tf, LttTrace *t)
         tf->tsc_lsb_truncate = vheader->tsc_lsb_truncate;
         tf->tscbits = vheader->tscbits;
         tf->tsc_msb_cutoff = 32 - tf->tsc_lsb_truncate - tf->tscbits;
+        tf->compact_event_bits = 32 - vheader->compact_data_shift;
         tf->tsc_mask = ((1ULL << (tf->tscbits))-1);
         tf->tsc_mask = tf->tsc_mask << tf->tsc_lsb_truncate;
         tf->tsc_mask_next_bit = (1ULL<<(tf->tscbits));
@@ -297,7 +298,6 @@ int parse_trace_header(void *header, LttTracefile *tf, LttTrace *t)
               (double)t->start_tsc
               * (1000000000.0 / tf->trace->freq_scale)
               / (double)t->start_freq);
-          t->compact_event_bits = 0;
         }
       }
       break;
This page took 0.025667 seconds and 4 git commands to generate.