trace = lttv_trace(trace_v);
g_assert(trace != NULL);
- name = ltt_trace_name(trace);
+ name = g_quark_to_string(ltt_trace_name(trace));
if(strcmp(name, path) == 0) {
/* Found */
/* create new traceset and tracesetcontext */
LttvTraceset *ts;
LttvTracesetStats *tss;
+ LttvTracesetContextPosition *sync_position;
attribute = lttv_trace_attribute(trace);
g_assert(lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
lttv_context_init(LTTV_TRACESET_CONTEXT(tss), ts);
+ g_assert(lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
+ LTTV_COMPUTATION_SYNC_POSITION,
+ LTTV_POINTER,
+ &value));
+
+ sync_position = lttv_traceset_context_position_new();
+ *(value.v_pointer) = sync_position;
+
value = lttv_attribute_add(attribute,
LTTV_REQUESTS_QUEUE,
LTTV_POINTER);
/* destroy traceset and tracesetcontext */
LttvTraceset *ts;
LttvTracesetStats *tss;
+ LttvTracesetContextPosition *sync_position;
l_attribute = lttv_trace_attribute(trace);
&value));
ts = (LttvTraceset*)*(value.v_pointer);
+ g_assert(lttv_iattribute_find(LTTV_IATTRIBUTE(l_attribute),
+ LTTV_COMPUTATION_SYNC_POSITION,
+ LTTV_POINTER,
+ &value));
+ sync_position = (LttvTracesetContextPosition*)*(value.v_pointer);
+
+ lttv_traceset_context_position_destroy(sync_position);
+
+ lttv_iattribute_remove_by_name(LTTV_IATTRIBUTE(l_attribute),
+ LTTV_COMPUTATION_SYNC_POSITION);
+
g_assert(lttv_iattribute_find(LTTV_IATTRIBUTE(l_attribute),
LTTV_COMPUTATION_TRACESET_CONTEXT,
LTTV_POINTER,
LttvTracesetContext *tsc;
LttvTracesetStats *tss;
LttvTraceset *ts;
+ LttvTracesetContextPosition *sync_position;
LttvAttribute *attribute;
LttvAttribute *g_attribute = lttv_global_attributes();
GSList **list_out, **list_in, **notify_in, **notify_out;
tss = (LttvTracesetStats*)*(value.v_pointer);
g_assert(LTTV_IS_TRACESET_CONTEXT(tsc));
g_assert(LTTV_IS_TRACESET_STATS(tss));
+
+ type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute),
+ LTTV_COMPUTATION_SYNC_POSITION,
+ &value);
+ g_assert(type == LTTV_POINTER);
+ sync_position = (LttvTracesetContextPosition*)*(value.v_pointer);
/* There is no events requests pending : we should never have been called! */
g_assert(g_slist_length(*list_out) != 0 || g_slist_length(*list_in) != 0);
-#if 0
/* 0.1 Lock traces */
{
guint iter_trace=0;
}
}
/* 0.2 Sync tracefiles */
- lttv_process_traceset_synchronize_tracefiles(tsc);
-#endif //0
+ g_assert(lttv_process_traceset_seek_position(tsc, sync_position) == 0);
+ // lttv_process_traceset_synchronize_tracefiles(tsc);
/* 1. Before processing */
{
/* if list_in is empty */
}
}
}
-#if 0
/* 4. Unlock traces */
{
- //lttv_process_traceset_get_sync_data(tsc);
+ // lttv_process_traceset_get_sync_data(tsc);
+ lttv_traceset_context_position_save(tsc, sync_position);
guint iter_trace;
for(iter_trace=0;
lttvwindowtraces_unlock(trace_v);
}
}
-#endif //0
return ret_val;
}