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));
(double)t->start_tsc
* (1000000000.0 / tf->trace->freq_scale)
/ (double)t->start_freq);
- t->compact_event_bits = 0;
}
}
break;
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(" ");
/* 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 */
if (a_event_debug)
print_debug_event_data(&tf->event);
+ /* Having a marker load or marker format event out of the facilities
+ * tracefiles is a serious bug. */
+ switch((enum marker_id)tf->event.event_id) {
+ case MARKER_ID_SET_MARKER_ID:
+ case MARKER_ID_SET_MARKER_FORMAT:
+ if (tf->name != g_quark_from_string("/control/facilities"))
+ g_error("Trace inconsistency : metadata event found in data "
+ "tracefile %s", g_quark_to_string(tf->long_name));
+ }
+
if (tf->event.data_size != tf->event.event_size) {
struct marker_info *info = marker_get_info_from_id(tf->trace,
tf->event.event_id);