+ guint i;
+ guint num_traces = lttv_traceset_number(self->ts);
+
+ for(i=0; i<num_traces;i++) {
+ GArray * tracefiles = self->traces[i]->tracefiles;
+ guint j;
+ guint num_tracefiles = tracefiles->len;
+
+ for(j=0;j<num_tracefiles;j++) {
+ LttvTracefileContext **tfc = &g_array_index(tracefiles,
+ LttvTracefileContext*, j);
+
+ LttEvent *event = ltt_tracefile_get_event((*tfc)->tf);
+ LttEventPosition *ep;
+
+ if(ltt_time_compare((*tfc)->timestamp, ltt_time_infinite) != 0) {
+ ep = ltt_event_position_new();
+ ltt_event_position(event, ep);
+ if(ltt_time_compare((*tfc)->timestamp, pos->timestamp) < 0)
+ pos->timestamp = (*tfc)->timestamp;
+ } else {
+ ep = NULL;
+ }
+ g_array_append_val(pos->tfc, *tfc);
+ g_array_append_val(pos->ep, ep);
+ }
+
+ }