X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fcontrolflow%2Feventhooks.c;h=fc4e2caa4724518e1de10f5fb0c8a04a360af122;hb=40debf7ba758820af936895254394591f139f732;hp=732047de56afab81ea71bf3525980427ebce7d8f;hpb=16b9cadbb4598e4f850236707083f9cac616d938;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c index 732047de..fc4e2caa 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c @@ -271,7 +271,7 @@ int event_selected_hook(void *hook_data, void *call_data) } /* Function that selects the color of status&exemode line */ -static __inline PropertiesLine prepare_s_e_line(LttvProcessState *process) +static __inline__ PropertiesLine prepare_s_e_line(LttvProcessState *process) { PropertiesLine prop_line; prop_line.line_width = 2; @@ -318,7 +318,7 @@ static __inline PropertiesLine prepare_s_e_line(LttvProcessState *process) } #if 0 -static __inline PropertiesLine prepare_status_line(LttvProcessState *process) +static __inline__ PropertiesLine prepare_status_line(LttvProcessState *process) { PropertiesLine prop_line; prop_line.line_width = 2; @@ -391,15 +391,7 @@ int before_schedchange_hook(void *hook_data, void *call_data) e = tfc->e; LttTime evtime = ltt_event_time(e); - TimeWindow time_window = - lttvwindow_get_time_window(control_flow_data->tab); - LttTime end_time = time_window.end_time; -#ifdef EXTRA_CHECK - if(ltt_time_compare(evtime, time_window.start_time) == -1 - || ltt_time_compare(evtime, end_time) == 1) - return; -#endif //EXTRA_CHECK guint width = drawing->width; /* we are in a schedchange, before the state update. We must draw the @@ -427,8 +419,11 @@ int before_schedchange_hook(void *hook_data, void *call_data) * present, it's a new process and it was not present : it will * be added after the state update. */ LttvProcessState *process; - process = lttv_state_find_process(tfs, pid_out); - //process = tfs->process; + /* unknown state, bad current pid */ + if(tfs->process->pid != pid_out) + process = lttv_state_find_process(tfs, pid_out); + else + process = tfs->process; if(process != NULL) { /* Well, the process_out existed : we must get it in the process hash @@ -439,11 +434,10 @@ int before_schedchange_hook(void *hook_data, void *call_data) HashedProcessData *hashed_process_data = NULL; ProcessList *process_list = control_flow_data->process_list; LttTime birth = process->creation_time; - const gchar *name = g_quark_to_string(process->name); if(processlist_get_process_pixels(process_list, pid_out, - process->last_cpu, + process->last_cpu_index, &birth, tfc->t_context->index, &y, @@ -451,11 +445,12 @@ int before_schedchange_hook(void *hook_data, void *call_data) &hashed_process_data) == 1) { g_assert(pid_out == 0 || pid_out != process->ppid); + const gchar *name = g_quark_to_string(process->name); /* Process not present */ ProcessInfo *process_info; processlist_add(process_list, pid_out, - process->last_cpu, + process->last_cpu_index, process->ppid, &birth, tfc->t_context->index, @@ -464,7 +459,6 @@ int before_schedchange_hook(void *hook_data, void *call_data) &process_info, &hashed_process_data); processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data, &y, &height); @@ -485,6 +479,14 @@ int before_schedchange_hook(void *hook_data, void *call_data) evtime) > 0) { if(hashed_process_data->x.middle_marked == FALSE) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + guint x; convert_time_to_pixels( time_window, @@ -501,6 +503,14 @@ int before_schedchange_hook(void *hook_data, void *call_data) hashed_process_data->x.middle_marked = TRUE; } } else { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + guint x; convert_time_to_pixels( time_window, @@ -583,11 +593,10 @@ int before_schedchange_hook(void *hook_data, void *call_data) HashedProcessData *hashed_process_data = NULL; ProcessList *process_list = control_flow_data->process_list; LttTime birth = process->creation_time; - const gchar *name = g_quark_to_string(process->name); if(processlist_get_process_pixels(process_list, pid_in, - process->last_cpu, + process->last_cpu_index, &birth, tfc->t_context->index, &y, @@ -595,11 +604,12 @@ int before_schedchange_hook(void *hook_data, void *call_data) &hashed_process_data) == 1) { g_assert(pid_in == 0 || pid_in != process->ppid); + const gchar *name = g_quark_to_string(process->name); /* Process not present */ ProcessInfo *process_info; processlist_add(process_list, pid_in, - process->last_cpu, + process->last_cpu_index, process->ppid, &birth, tfc->t_context->index, @@ -608,12 +618,13 @@ int before_schedchange_hook(void *hook_data, void *call_data) &process_info, &hashed_process_data); processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data, &y, &height); drawing_insert_square( drawing, y, height); } + //We could set the current process and hash here, but will be done + //by after schedchange hook /* Now, the process is in the state hash and our own process hash. * We definitely can draw the items related to the ending state. @@ -630,6 +641,13 @@ int before_schedchange_hook(void *hook_data, void *call_data) evtime) > 0) { if(hashed_process_data->x.middle_marked == FALSE) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK guint x; convert_time_to_pixels( time_window, @@ -646,6 +664,13 @@ int before_schedchange_hook(void *hook_data, void *call_data) hashed_process_data->x.middle_marked = TRUE; } } else { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK guint x; convert_time_to_pixels( @@ -731,11 +756,11 @@ int before_schedchange_hook(void *hook_data, void *call_data) TimeWindow time_window = lttvwindow_get_time_window(tab); - LttTime end_time = time_window.end_time; + LttTime time_window.end_time = time_window.time_window.end_time; //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) + || ltt_time_compare(evtime, time_window.end_time) == 1) return; if(strcmp(ltt_eventtype_name(ltt_event_eventtype(e)),"schedchange") == 0) @@ -842,7 +867,7 @@ int before_schedchange_hook(void *hook_data, void *call_data) LttTime time = ltt_event_time(e); - LttTime window_end = time_window.end_time; + LttTime window_end = time_window.time_window.end_time; convert_time_to_pixels( time_window, @@ -1346,16 +1371,6 @@ int after_schedchange_hook(void *hook_data, void *call_data) e = tfc->e; LttTime evtime = ltt_event_time(e); - TimeWindow time_window = - lttvwindow_get_time_window(control_flow_data->tab); - - LttTime end_time = time_window.end_time; - -#ifdef EXTRA_CHECK - if(ltt_time_compare(evtime, time_window.start_time) == -1 - || ltt_time_compare(evtime, end_time) == 1) - return; -#endif //EXTRA_CHECK guint width = control_flow_data->drawing->width; @@ -1381,16 +1396,16 @@ int after_schedchange_hook(void *hook_data, void *call_data) /* Find process pid_in in the list... */ - process_in = lttv_state_find_process(tfs, pid_in); + //process_in = lttv_state_find_process(tfs, pid_in); + process_in = tfs->process; /* It should exist, because we are after the state update. */ g_assert(process_in != NULL); birth = process_in->creation_time; - const gchar *name = g_quark_to_string(process_in->name); if(processlist_get_process_pixels(process_list, pid_in, - process_in->last_cpu, + process_in->last_cpu_index, &birth, tfc->t_context->index, &y_in, @@ -1398,11 +1413,12 @@ int after_schedchange_hook(void *hook_data, void *call_data) &hashed_process_data_in) == 1) { g_assert(pid_in == 0 || pid_in != process_in->ppid); + const gchar *name = g_quark_to_string(process_in->name); ProcessInfo *process_info; /* Process not present */ processlist_add(process_list, pid_in, - process_in->last_cpu, + process_in->last_cpu_index, process_in->ppid, &birth, tfc->t_context->index, @@ -1411,16 +1427,27 @@ int after_schedchange_hook(void *hook_data, void *call_data) &process_info, &hashed_process_data_in); processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data_in, &y_in, &height); drawing_insert_square( control_flow_data->drawing, y_in, height); } + /* Set the current process */ + process_list->current_hash_data[process_in->last_cpu_index] = + hashed_process_data_in; if(ltt_time_compare(hashed_process_data_in->next_good_time, evtime) <= 0) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + guint new_x; convert_time_to_pixels( @@ -1458,11 +1485,11 @@ int after_schedchange_hook(void *hook_data, void *call_data) TimeWindow time_window = lttvwindow_get_time_window(control_flow_data->tab); - LttTime end_time = time_window.end_time; + LttTime time_window.end_time = time_window.time_window.end_time; //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) + || ltt_time_compare(evtime, time_window.end_time) == 1) return; @@ -1571,7 +1598,7 @@ int after_schedchange_hook(void *hook_data, void *call_data) //LttTime time = ltt_event_time(e); - //LttTime window_end = time_window->end_time; + //LttTime window_end = time_window->time_window.end_time; //convert_time_to_pixels( @@ -1892,7 +1919,7 @@ int after_schedchange_hook(void *hook_data, void *call_data) } #if 0 -static __inline PropertiesLine prepare_execmode_line(LttvProcessState *process) +static __inline__ PropertiesLine prepare_execmode_line(LttvProcessState *process) { PropertiesLine prop_line; prop_line.line_width = 1; @@ -1958,17 +1985,6 @@ int before_execmode_hook(void *hook_data, void *call_data) e = tfc->e; LttTime evtime = ltt_event_time(e); - TimeWindow time_window = - lttvwindow_get_time_window(control_flow_data->tab); - - LttTime end_time = time_window.end_time; - -#ifdef EXTRA_CHECK - if(ltt_time_compare(evtime, time_window.start_time) == -1 - || ltt_time_compare(evtime, end_time) == 1) - return; -#endif //EXTRA_CHECK - guint width = drawing->width; /* we are in a execmode, before the state update. We must draw the @@ -1989,36 +2005,46 @@ int before_execmode_hook(void *hook_data, void *call_data) HashedProcessData *hashed_process_data = NULL; ProcessList *process_list = control_flow_data->process_list; LttTime birth = process->creation_time; - const gchar *name = g_quark_to_string(process->name); - - if(processlist_get_process_pixels(process_list, - pid, - process->last_cpu, - &birth, - tfc->t_context->index, - &y, - &height, - &hashed_process_data) == 1) - { - g_assert(pid == 0 || pid != process->ppid); - ProcessInfo *process_info; - /* Process not present */ - processlist_add(process_list, - pid, - process->last_cpu, - process->ppid, - &birth, - tfc->t_context->index, - name, - &pl_height, - &process_info, - &hashed_process_data); + + if(process_list->current_hash_data[tfc->index] != NULL) { + hashed_process_data = process_list->current_hash_data[tfc->index]; processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data, &y, &height); - drawing_insert_square( drawing, y, height); + } else { + if(processlist_get_process_pixels(process_list, + pid, + process->last_cpu_index, + &birth, + tfc->t_context->index, + &y, + &height, + &hashed_process_data) == 1) + { + g_assert(pid == 0 || pid != process->ppid); + ProcessInfo *process_info; + /* Process not present */ + const gchar *name = g_quark_to_string(process->name); + processlist_add(process_list, + pid, + process->last_cpu_index, + process->ppid, + &birth, + tfc->t_context->index, + name, + &pl_height, + &process_info, + &hashed_process_data); + processlist_get_pixels_from_data(process_list, + hashed_process_data, + &y, + &height); + drawing_insert_square( drawing, y, height); + } + /* Set the current process */ + process_list->current_hash_data[process->last_cpu_index] = + hashed_process_data; } /* Now, the process is in the state hash and our own process hash. @@ -2036,6 +2062,14 @@ int before_execmode_hook(void *hook_data, void *call_data) evtime) > 0) { if(hashed_process_data->x.middle_marked == FALSE) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK guint x; convert_time_to_pixels( time_window, @@ -2052,6 +2086,14 @@ int before_execmode_hook(void *hook_data, void *call_data) hashed_process_data->x.middle_marked = TRUE; } } else { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK guint x; convert_time_to_pixels( @@ -2141,17 +2183,6 @@ int after_execmode_hook(void *hook_data, void *call_data) e = tfc->e; LttTime evtime = ltt_event_time(e); - TimeWindow time_window = - lttvwindow_get_time_window(control_flow_data->tab); - - LttTime end_time = time_window.end_time; - -#ifdef EXTRA_CHECK - if(ltt_time_compare(evtime, time_window.start_time) == -1 - || ltt_time_compare(evtime, end_time) == 1) - return; -#endif //EXTRA_CHECK - guint width = control_flow_data->drawing->width; /* Add process to process list (if not present) */ @@ -2170,41 +2201,61 @@ int after_execmode_hook(void *hook_data, void *call_data) guint pid = process->pid; birth = process->creation_time; - const gchar *name = g_quark_to_string(process->name); - if(processlist_get_process_pixels(process_list, - pid, - process->last_cpu, - &birth, - tfc->t_context->index, - &y, - &height, - &hashed_process_data) == 1) - { - g_assert(pid == 0 || pid != process->ppid); - /* Process not present */ - ProcessInfo *process_info; - processlist_add(process_list, - pid, - process->last_cpu, - process->ppid, - &birth, - tfc->t_context->index, - name, - &pl_height, - &process_info, - &hashed_process_data); + if(process_list->current_hash_data[tfc->index] != NULL) { + hashed_process_data = process_list->current_hash_data[tfc->index]; processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data, &y, &height); - drawing_insert_square( control_flow_data->drawing, y, height); + } else { + if(processlist_get_process_pixels(process_list, + pid, + process->last_cpu_index, + &birth, + tfc->t_context->index, + &y, + &height, + &hashed_process_data) == 1) + { + g_assert(pid == 0 || pid != process->ppid); + /* Process not present */ + const gchar *name = g_quark_to_string(process->name); + ProcessInfo *process_info; + processlist_add(process_list, + pid, + process->last_cpu_index, + process->ppid, + &birth, + tfc->t_context->index, + name, + &pl_height, + &process_info, + &hashed_process_data); + processlist_get_pixels_from_data(process_list, + hashed_process_data, + &y, + &height); + drawing_insert_square( control_flow_data->drawing, y, height); + } + /* Set the current process */ + process_list->current_hash_data[process->last_cpu_index] = + hashed_process_data; } - + if(ltt_time_compare(hashed_process_data->next_good_time, evtime) <= 0) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + + guint new_x; convert_time_to_pixels( @@ -2249,17 +2300,6 @@ int before_process_hook(void *hook_data, void *call_data) e = tfc->e; LttTime evtime = ltt_event_time(e); - TimeWindow time_window = - lttvwindow_get_time_window(control_flow_data->tab); - - LttTime end_time = time_window.end_time; - -#ifdef EXTRA_CHECK - if(ltt_time_compare(evtime, time_window.start_time) == -1 - || ltt_time_compare(evtime, end_time) == 1) - return; -#endif //EXTRA_CHECK - guint width = control_flow_data->drawing->width; guint sub_id; @@ -2284,11 +2324,16 @@ int before_process_hook(void *hook_data, void *call_data) g_assert(process != NULL); birth = process->creation_time; - const gchar *name = g_quark_to_string(process->name); - if(processlist_get_process_pixels(process_list, + if(process_list->current_hash_data[tfc->index] != NULL) { + hashed_process_data = process_list->current_hash_data[tfc->index]; + processlist_get_pixels_from_data(process_list, + hashed_process_data, + &y, + &height); + } else if(processlist_get_process_pixels(process_list, pid, - process->last_cpu, + process->last_cpu_index, &birth, tfc->t_context->index, &y, @@ -2297,10 +2342,11 @@ int before_process_hook(void *hook_data, void *call_data) { g_assert(pid == 0 || pid != process->ppid); /* Process not present */ + const gchar *name = g_quark_to_string(process->name); ProcessInfo *process_info; processlist_add(process_list, pid, - process->last_cpu, + process->last_cpu_index, process->ppid, &birth, tfc->t_context->index, @@ -2309,7 +2355,6 @@ int before_process_hook(void *hook_data, void *call_data) &process_info, &hashed_process_data); processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data, &y, &height); @@ -2331,6 +2376,15 @@ int before_process_hook(void *hook_data, void *call_data) evtime) > 0) { if(hashed_process_data->x.middle_marked == FALSE) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + guint x; convert_time_to_pixels( time_window, @@ -2347,6 +2401,15 @@ int before_process_hook(void *hook_data, void *call_data) hashed_process_data->x.middle_marked = TRUE; } } else { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + guint x; convert_time_to_pixels( @@ -2444,17 +2507,6 @@ int after_process_hook(void *hook_data, void *call_data) e = tfc->e; LttTime evtime = ltt_event_time(e); - TimeWindow time_window = - lttvwindow_get_time_window(control_flow_data->tab); - - LttTime end_time = time_window.end_time; - -#ifdef EXTRA_CHECK - if(ltt_time_compare(evtime, time_window.start_time) == -1 - || ltt_time_compare(evtime, end_time) == 1) - return; -#endif //EXTRA_CHECK - guint width = control_flow_data->drawing->width; guint sub_id; @@ -2485,11 +2537,10 @@ int after_process_hook(void *hook_data, void *call_data) g_assert(process_child != NULL); birth = process_child->creation_time; - const gchar *name = g_quark_to_string(process_child->name); if(processlist_get_process_pixels(process_list, child_pid, - process_child->last_cpu, + process_child->last_cpu_index, &birth, tfc->t_context->index, &y_child, @@ -2498,10 +2549,11 @@ int after_process_hook(void *hook_data, void *call_data) { g_assert(child_pid == 0 || child_pid != process_child->ppid); /* Process not present */ + const gchar *name = g_quark_to_string(process_child->name); ProcessInfo *process_info; processlist_add(process_list, child_pid, - process_child->last_cpu, + process_child->last_cpu_index, process_child->ppid, &birth, tfc->t_context->index, @@ -2510,16 +2562,25 @@ int after_process_hook(void *hook_data, void *call_data) &process_info, &hashed_process_data_child); processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data_child, &y_child, &height); drawing_insert_square( control_flow_data->drawing, y_child, height); } + if(ltt_time_compare(hashed_process_data_child->next_good_time, evtime) <= 0) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + guint new_x; convert_time_to_pixels( time_window, @@ -2559,41 +2620,62 @@ int after_process_hook(void *hook_data, void *call_data) g_assert(process != NULL); birth = process->creation_time; - const gchar *name = g_quark_to_string(process->name); - if(processlist_get_process_pixels(process_list, - pid, - process->last_cpu, - &birth, - tfc->t_context->index, - &y, - &height, - &hashed_process_data) == 1) - { - g_assert(pid == 0 || pid != process->ppid); - /* Process not present */ - ProcessInfo *process_info; - processlist_add(process_list, - pid, - process->last_cpu, - process->ppid, - &birth, - tfc->t_context->index, - name, - &pl_height, - &process_info, - &hashed_process_data); + if(process_list->current_hash_data[tfc->index] != NULL) { + hashed_process_data = process_list->current_hash_data[tfc->index]; processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data, &y, &height); - drawing_insert_square( control_flow_data->drawing, y, height); + + } else { + if(processlist_get_process_pixels(process_list, + pid, + process->last_cpu_index, + &birth, + tfc->t_context->index, + &y, + &height, + &hashed_process_data) == 1) + { + g_assert(pid == 0 || pid != process->ppid); + /* Process not present */ + const gchar *name = g_quark_to_string(process->name); + ProcessInfo *process_info; + processlist_add(process_list, + pid, + process->last_cpu_index, + process->ppid, + &birth, + tfc->t_context->index, + name, + &pl_height, + &process_info, + &hashed_process_data); + processlist_get_pixels_from_data(process_list, + hashed_process_data, + &y, + &height); + drawing_insert_square( control_flow_data->drawing, y, height); + } + + /* Set the current process */ + process_list->current_hash_data[process->last_cpu_index] = + hashed_process_data; } if(ltt_time_compare(hashed_process_data->next_good_time, evtime) <= 0) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + guint new_x; convert_time_to_pixels( time_window, @@ -3032,17 +3114,6 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) LttvTracesetContext *tsc = (LttvTracesetContext*)closure_data->tss; LttTime evtime = closure_data->end_time; - TimeWindow time_window = - lttvwindow_get_time_window(control_flow_data->tab); - - LttTime end_time = time_window.end_time; - -#ifdef EXTRA_CHECK - if(ltt_time_compare(evtime, time_window.start_time) == -1 - || ltt_time_compare(evtime, end_time) == 1) - return; -#endif //EXTRA_CHECK - guint width = drawing->width; { @@ -3052,8 +3123,9 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) * draw items from the beginning of the read for it. If it is not * present, it's a new process and it was not present : it will * be added after the state update. */ +#ifdef EXTRA_CHECK g_assert(lttv_traceset_number(tsc->ts) > 0); - +#endif //EXTRA_CHECK /* tracefiles[0] is ok here, because we draw for every PID, and * assume CPU 0 for PID 0 //FIXME */ LttvTracefileState *tfs = @@ -3075,11 +3147,8 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) if(control_flow_data->background_info_waiting==0) g_assert(ltt_time_compare(process->creation_time, process_info->birth) == 0); - const gchar *name = g_quark_to_string(process->name); - /* process HAS to be present */ processlist_get_pixels_from_data(process_list, - process_info, hashed_process_data, &y, &height); @@ -3098,6 +3167,14 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) if(ltt_time_compare(hashed_process_data->next_good_time, evtime) <= 0) { + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK guint x; convert_time_to_pixels( @@ -3247,6 +3324,9 @@ int after_chunk(void *hook_data, void *call_data) ProcessList *process_list = control_flow_data->process_list; + g_free(process_list->current_hash_data); + process_list->current_hash_data = NULL; + if(tfc != NULL) end_time = LTT_TIME_MIN(tfc->timestamp, events_request->end_time); else /* end of traceset, or position now out of request : end */