X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fevent.c;h=e5c451111ca37e93749f987ac3612cbceb14cb91;hb=60297a6ca2474d2c7dd4408d5d07b6960e997345;hp=b230fd30d7aa87ef9356cc14d954477ad167894e;hpb=e52d9126ec77e0922c287201538bb7da56bfc147;p=lttv.git diff --git a/ltt/branches/poly/ltt/event.c b/ltt/branches/poly/ltt/event.c index b230fd30..e5c45111 100644 --- a/ltt/branches/poly/ltt/event.c +++ b/ltt/branches/poly/ltt/event.c @@ -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;