use slow recomputation to show control flow.
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 3 Feb 2004 23:16:02 +0000 (23:16 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 3 Feb 2004 23:16:02 +0000 (23:16 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@477 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/main/state.c
ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c

index e6b6a78a248bd3f4f2502968ac90a4e3df2b9ac9..f9d123e03a5f8d3051a9b4c337b817f577d3cd09 100644 (file)
@@ -130,8 +130,8 @@ init(LttvTracesetState *self, LttvTraceset *ts)
     tc = self->parent.traces[i];
     tcs = (LttvTraceState *)tc;
     tcs->save_interval = 100000;
-    tcs->recompute_state_in_seek = false;
-    tcs->saved_state_ready = false;
+    tcs->recompute_state_in_seek = TRUE;
+    tcs->saved_state_ready = FALSE;
     fill_name_tables(tcs);
 
     nb_control = ltt_trace_control_tracefile_number(tc->t);
@@ -1033,18 +1033,13 @@ void lttv_state_traceset_seek_time_closest(LttvTracesetState *self, LttTime t)
         /* restore the closest earlier saved state */
         if(min_pos != -1) lttv_state_restore(tcs, closest_tree);
 
-        /* there is no earlier saved state, restart at T0 */
-        else {
-          restore_init_state(tcs);
-          lttv_process_trace_seek_time(&(tcs->parent), ltt_time_zero);
-        }
-
+      }
       /* There is no saved state yet we want to have it. Restart at T0 */
       else {
         restore_init_state(tcs);
         lttv_process_trace_seek_time(&(tcs->parent), ltt_time_zero);
       }
-
+    }
     /* We want to seek quickly without restoring/updating the state */
     else {
       restore_init_state(tcs);
index ea7080f71b1e7b0694288e6898b624355f97cd0d..9beac5d486318bce81337fdc3ce518a815a1186e 100644 (file)
@@ -157,6 +157,17 @@ int draw_event_hook(void *hook_data, void *call_data)
   LttEvent *e;
   e = tfc->e;
 
+  LttTime evtime = ltt_event_time(e);
+  TimeWindow *time_window = 
+    guicontrolflow_get_time_window(control_flow_data);
+
+  LttTime end_time = ltt_time_add(time_window->start_time,
+                                    time_window->time_width);
+  //if(time < time_beg || time > time_end) return;
+  if(ltt_time_compare(evtime, time_window->start_time) == -1
+        || ltt_time_compare(evtime, end_time) == 1)
+            return;
+
   if(strcmp(ltt_eventtype_name(ltt_event_eventtype(e)),"schedchange") == 0)
   {
     g_critical("schedchange!");
@@ -265,8 +276,7 @@ int draw_event_hook(void *hook_data, void *call_data)
         time,
         width,
         &x);
-    
-    assert(x <= width);
+    //assert(x <= width);
     
     /* draw what represents the event for outgoing process. */
 
@@ -632,6 +642,18 @@ int draw_after_hook(void *hook_data, void *call_data)
   LttEvent *e;
   e = tfc->e;
 
+  LttTime evtime = ltt_event_time(e);
+  TimeWindow *time_window = 
+    guicontrolflow_get_time_window(control_flow_data);
+
+  LttTime end_time = ltt_time_add(time_window->start_time,
+                                    time_window->time_width);
+  //if(time < time_beg || time > time_end) return;
+  if(ltt_time_compare(evtime, time_window->start_time) == -1
+        || ltt_time_compare(evtime, end_time) == 1)
+            return;
+
+
   if(strcmp(ltt_eventtype_name(ltt_event_eventtype(e)),"schedchange") == 0)
   {
     g_critical("schedchange!");
This page took 0.030399 seconds and 4 git commands to generate.