X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fstate.c;h=b107c25b40554c7e5d17a9f3f1052622f290d69a;hb=3054461acbbd00cc70e9e3046050f074e9eec4c9;hp=6ee5e32e1dc9d04a7cdbfbb0ad521e53789dd8ff;hpb=667ca2a017e4df437ea5fc5d2bc1be2e0fcd9f7e;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 6ee5e32e..b107c25b 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -438,8 +438,10 @@ static void state_save(LttvTraceState *self, LttvAttribute *container) *(value.v_uint) = tfcs->process->pid; value = lttv_attribute_add(tracefile_tree, LTTV_STATE_EVENT, LTTV_POINTER); - /* Only save the position of the tfs is in the pqueue */ - if(!g_tree_lookup(self->parent.ts_context->pqueue, &tfcs->parent)) { + /* Only save the position if the tfs has not infinite time. */ + //if(!g_tree_lookup(self->parent.ts_context->pqueue, &tfcs->parent) + // && current_tfcs != tfcs) { + if(ltt_time_compare(tfcs->parent.timestamp, ltt_time_infinite) == 0) { *(value.v_pointer) = NULL; } else { LttEvent *e = ltt_tracefile_get_event(tfcs->parent.tf); @@ -1549,9 +1551,10 @@ void lttv_state_save_add_event_hooks(LttvTracesetState *self) ts = (LttvTraceState *)self->parent.traces[i]; nb_tracefile = ts->parent.tracefiles->len; + guint *event_count = g_new(guint, 1); + *event_count = 0; + for(j = 0 ; j < nb_tracefile ; j++) { - guint *event_count = g_new(guint, 1); - *event_count = 0; tfs = LTTV_TRACEFILE_STATE(g_array_index(ts->parent.tracefiles, LttvTracefileContext*, j)); @@ -1637,9 +1640,9 @@ void lttv_state_save_remove_event_hooks(LttvTracesetState *self) LttvTracefileContext*, j)); event_count = lttv_hooks_remove(tfs->parent.event, state_save_event_hook); - g_free(event_count); } + g_free(event_count); } }