From 9444deaec7e79ec8da6fb4b8edf05babb17cd883 Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 3 Feb 2004 23:16:02 +0000 Subject: [PATCH] use slow recomputation to show control flow. git-svn-id: http://ltt.polymtl.ca/svn@477 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/main/state.c | 13 +++------- .../lttv/modules/gui/controlflow/eventhooks.c | 26 +++++++++++++++++-- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ltt/branches/poly/lttv/main/state.c b/ltt/branches/poly/lttv/main/state.c index e6b6a78a..f9d123e0 100644 --- a/ltt/branches/poly/lttv/main/state.c +++ b/ltt/branches/poly/lttv/main/state.c @@ -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); diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c index ea7080f7..9beac5d4 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c @@ -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!"); -- 2.34.1