X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Ftracefile.c;h=a1e19a7fae56871a6d0889a6101c35ce8f760780;hb=9d7e0c255f8df252a67f60bbb3ddd8c6b4dde0d9;hp=8c3cd6bd51507d1a278a1d1bc415403044aa90ce;hpb=b6fd32e3f4dabae19341b4b0631645096ec4b211;p=lttv.git diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index 8c3cd6bd..a1e19a7f 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -1582,6 +1582,10 @@ int ltt_tracefile_seek_position(LttTracefile *tf, const LttEventPosition *ep) { tf->event.offset = ep->offset; + /* Put back the event real tsc */ + tf->event.tsc = ep->tsc; + tf->buffer.tsc = ep->tsc; + err = ltt_tracefile_read_update_event(tf); if(err) goto fail; err = ltt_tracefile_read_op(tf); @@ -1742,7 +1746,6 @@ int ltt_tracefile_read_update_event(LttTracefile *tf) tf->buffer.tsc = event->tsc; pos += sizeof(guint64); } - event->event_time = ltt_interpolate_time(tf, event); event->facility_id = *(guint8*)pos; pos += sizeof(guint8); @@ -1929,7 +1932,7 @@ void ltt_update_event_size(LttTracefile *tf) } } else { if(!f->exists) { - g_error("Unknown facility %hhu (0x%hhx) in tracefile %s", + g_warning("Unknown facility %hhu (0x%hhx) in tracefile %s", tf->event.facility_id, tf->event.facility_id, g_quark_to_string(tf->name)); @@ -1940,7 +1943,7 @@ void ltt_update_event_size(LttTracefile *tf) ltt_facility_eventtype_get(f, tf->event.event_id); if(!event_type) { - g_error("Unknown event id %hhu in facility %s in tracefile %s", + g_warning("Unknown event id %hhu in facility %s in tracefile %s", tf->event.event_id, g_quark_to_string(f->name), g_quark_to_string(tf->name)); @@ -1958,6 +1961,10 @@ void ltt_update_event_size(LttTracefile *tf) tf->event.data_size = size; /* Check consistency between kernel and LTTV structure sizes */ + if(tf->event.event_size == 0xFFFF) { + /* Event size too big to fit in the event size field */ + tf->event.event_size = tf->event.data_size; + } g_assert(tf->event.data_size == tf->event.event_size); return; @@ -1965,7 +1972,12 @@ void ltt_update_event_size(LttTracefile *tf) facility_error: event_type_error: event_id_error: - tf->event.data_size = 0; + if(tf->event.event_size == 0xFFFF) { + g_error("Cannot jump over an unknown event bigger than 0xFFFE bytes"); + } + /* The facility is unknown : use the kernel information about this event + * to jump over it. */ + tf->event.data_size = tf->event.event_size; } @@ -2654,6 +2666,10 @@ gint check_fields_compatibility(LttEventType *event_type1, different = 1; goto end; } + if(type1->network != type2->network) { + different = 1; + goto end; + } switch(type1->type_class) { case LTT_INT_FIXED: