*(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);
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));
LttvTracefileContext*, j));
event_count = lttv_hooks_remove(tfs->parent.event,
state_save_event_hook);
- g_free(event_count);
}
+ g_free(event_count);
}
}
read_ret = ltt_tracefile_read(tfc->tf);
if(likely(!read_ret)) {
- g_debug("An event is ready");
+ //g_debug("An event is ready");
tfc->timestamp = ltt_event_time(e);
g_assert(ltt_time_compare(tfc->timestamp, ltt_time_infinite) != 0);
g_tree_insert(pqueue, tfc, tfc);
return pos;
}
-/* Save all positions, the ones not in the pqueue will have NULL
+/* Save all positions, the ones with infinite time will have NULL
* ep. */
void lttv_traceset_context_position_save(const LttvTracesetContext *self,
LttvTracesetContextPosition *pos)