Hooks the trace synchronization code in lttvwindow. This allows to use trace
synchronization in graphical mode when lttv is started with the "--sync"
option. Unfortunately, the viewer interface "freezes" while the
synchronization code is running. This can take a noticeable amount of time
(more than a minute) for large traces.
Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
{
LttvTracesetContext *tsc =
LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
{
LttvTracesetContext *tsc =
LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
TimeInterval time_span = tsc->time_span;
TimeWindow new_time_window = tab->time_window;
LttTime new_current_time = tab->current_time;
TimeInterval time_span = tsc->time_span;
TimeWindow new_time_window = tab->time_window;
LttTime new_current_time = tab->current_time;
LttvHooks * tmp;
LttvAttributeValue value;
gint retval = 0;
LttvHooks * tmp;
LttvAttributeValue value;
gint retval = 0;
retval= lttv_iattribute_find_by_path(tab->attributes,
"hooks/updatetraceset", LTTV_POINTER, &value);
g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
retval= lttv_iattribute_find_by_path(tab->attributes,
"hooks/updatetraceset", LTTV_POINTER, &value);
g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
- if(tmp == NULL) retval = 1;
- else lttv_hooks_call(tmp,traceset);
+ if(tmp == NULL)
+ retval = 1;
+ else
+ lttv_hooks_call(tmp,traceset);
time_change_manager(tab, new_time_window);
current_time_change_manager(tab, new_current_time);
time_change_manager(tab, new_time_window);
current_time_change_manager(tab, new_current_time);
LTTV_MODULE("lttvwindow", "Viewer main window", \
"Viewer with multiple windows, tabs and panes for graphical modules", \
LTTV_MODULE("lttvwindow", "Viewer main window", \
"Viewer with multiple windows, tabs and panes for graphical modules", \
- init, destroy, "stats", "option")
+ init, destroy, "stats", "option", "sync")