Graphical mode synchronization
authorBenjamin Poirier <benjamin.poirier@polymtl.ca>
Wed, 22 Jul 2009 18:21:32 +0000 (14:21 -0400)
committerBenjamin Poirier <benjamin.poirier@polymtl.ca>
Fri, 18 Dec 2009 19:03:24 +0000 (14:03 -0500)
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>
lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c
lttv/modules/gui/lttvwindow/lttvwindow/init_module.c

index 565cec17a76d5876b3eea4395be020d0e483ed0e..5ce1f9251bb6f34b9d02c3805ffc3fad1b5e24d1 100644 (file)
@@ -467,6 +467,8 @@ int SetTraceset(Tab * tab, LttvTraceset *traceset)
 {
   LttvTracesetContext *tsc =
         LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
+
+  sync_traceset(tsc);
   TimeInterval time_span = tsc->time_span;
   TimeWindow new_time_window = tab->time_window;
   LttTime new_current_time = tab->current_time;
@@ -551,15 +553,16 @@ int SetTraceset(Tab * tab, LttvTraceset *traceset)
   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);
-  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);
index cb3f3dc4cee1522ded2f8768d7451f73ec0bc2ba..99ab15f73972158ad4d9ab6d34736a610ec8e46b 100644 (file)
@@ -259,4 +259,4 @@ static void destroy() {
 
 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")
This page took 0.027312 seconds and 4 git commands to generate.