From: compudj Date: Fri, 12 Oct 2007 12:30:21 +0000 (+0000) Subject: add compact event field X-Git-Tag: v0.12.20~821 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=08a986f1cdbafcf23ef4eb6665f59860d044914a;p=lttv.git add compact event field git-svn-id: http://ltt.polymtl.ca/svn@2668 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/ltt/ltt-private.h b/ltt/branches/poly/ltt/ltt-private.h index c255916c..3cbb9bf2 100644 --- a/ltt/branches/poly/ltt/ltt-private.h +++ b/ltt/branches/poly/ltt/ltt-private.h @@ -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 diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index e6e06987..d37c694d 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -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;