fix bug : forgot to save tracefile info with event position
[lttv.git] / ltt / branches / poly / ltt / event.c
index b230fd30d7aa87ef9356cc14d954477ad167894e..e5c451111ca37e93749f987ac3612cbceb14cb91 100644 (file)
@@ -227,21 +227,19 @@ LttField *ltt_event_field(LttEvent *e)
 {
   LttField * field;
   LttEventType * event_type = ltt_event_eventtype(e);
-  if(!event_type) return NULL;
+  if(unlikely(!event_type)) return NULL;
   field = event_type->root_field;
-  if(!field) return NULL;
+  if(unlikely(!field)) return NULL;
 
   //check if the field need refresh
-  if(e->which_block != event_type->latest_block ||
-     e->which_event != event_type->latest_event){
+  if(likely(e->which_block != event_type->latest_block ||
+            e->which_event != event_type->latest_event)){
 
     event_type->latest_block = e->which_block;
     event_type->latest_event = e->which_event;
     
-    if(field->field_fixed == 1)return field;
-
-    //refresh the field
-    ltt_event_refresh_fields(0, 0, field, e->data);    
+    if(unlikely(field->field_fixed != 1))
+      ltt_event_refresh_fields(0, 0, field, e->data);
   }
   return field;
 }
@@ -292,7 +290,7 @@ void ltt_event_position(LttEvent *e, LttEventPosition *ep)
   ep->old_position      = TRUE;
   ep->event_offset      = e->data - e->tracefile->buffer - EVENT_HEADER_SIZE ;
   ep->tf                = e->tracefile;
-
+  ep->overflow_nsec     = e->overflow_nsec;
   /* This is a workaround for fast position seek */
   ep->last_event_pos = e->last_event_pos;
   ep->prev_block_end_time = e->prev_block_end_time;
This page took 0.022994 seconds and 4 git commands to generate.