+ LttTracefile *tf = 0;
+ LttvTracefileContext **tfc;
+
+ /* Skip non live traces */
+ if(self->t->is_live) {
+
+ nb_tracefile = ltt_trace_update(self->t);
+
+ /* Recreate the pqueue following an update*/
+ GTree *pqueue = self->ts_context->pqueue;
+
+ for(i = 0 ; i < self->tracefiles->len ; i++) {
+ tfc = &g_array_index(self->tracefiles, LttvTracefileContext*, i);
+ tf = (*tfc)->tf;
+ if(g_tree_remove(pqueue, *tfc) == FALSE) {
+ if(tf->buf_index != NULL) {
+
+ if(ltt_tracefile_read(tf) == 0) {
+
+ (*tfc)->timestamp = ltt_event_time(ltt_tracefile_get_event((*tfc)->tf));
+ g_tree_insert(pqueue, (*tfc), (*tfc));
+
+ }
+ }
+ } else {
+ g_tree_insert(pqueue, (*tfc), (*tfc));
+
+ }
+
+
+ }
+ //Update self time span
+ self->time_span.end_time = LTT_TIME_MAX(self->t->live_safe_timestamp,
+ self->time_span.end_time);
+ //Update self tscontext time span
+ self->ts_context->time_span.end_time = LTT_TIME_MAX(self->time_span.end_time,
+ self->ts_context->time_span.end_time);
+ }
+ return nb_tracefile;
+
+}
+
+/****************************************************************************
+ * lttv_process_traceset_update
+ *
+ * process the changes that occur in the traceset.
+ *
+ * Return the number of file presently monitor(open for writting). If 0, the
+ * current traceset probably received all the data.
+ ***************************************************************************/
+guint lttv_process_traceset_update(LttvTracesetContext *self)