- }
-
- tfc->target_pid = pid_in;
- if(!filter || !filter->head ||
- lttv_filter_tree_parse(filter->head,e,tfc->tf,
- tfc->t_context->t,tfc,NULL,NULL)) {
- /* For the pid_in */
- /* First, check if the current process is in the state computation
- * process list. If it is there, that means we must add it right now and
- * 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. */
- LttvProcessState *process;
- process = lttv_state_find_process(ts,
- tfs->cpu, pid_in);
- guint trace_num = ts->parent.index;
-
- if(process != NULL) {
- /* Well, the process existed : we must get it in the process hash
- * or add it, and draw its items.
- */
- /* Add process to process list (if not present) */
- guint pl_height = 0;
- HashedProcessData *hashed_process_data = NULL;
- ProcessList *process_list = control_flow_data->process_list;
- LttTime birth = process->creation_time;
-
- hashed_process_data = processlist_get_process_data(process_list,
- pid_in,
- tfs->cpu,
- &birth,
- trace_num);
- if(hashed_process_data == NULL)
- {
- g_assert(pid_in == 0 || pid_in != process->ppid);
- /* Process not present */
- ProcessInfo *process_info;
- Drawing_t *drawing = control_flow_data->drawing;
- processlist_add(process_list,
- drawing,
- pid_in,
- process->tgid,
- tfs->cpu,
- process->ppid,
- &birth,
- trace_num,
- process->name,
- process->brand,
- &pl_height,
- &process_info,
- &hashed_process_data);
- gtk_widget_set_size_request(drawing->drawing_area,
- -1,
- pl_height);
- gtk_widget_queue_draw(drawing->drawing_area);
-
- }
- //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.
- */
-
- if(ltt_time_compare(hashed_process_data->next_good_time,
- 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
- Drawing_t *drawing = control_flow_data->drawing;
- guint width = drawing->width;
- guint x;
- convert_time_to_pixels(
- time_window,
- evtime,
- width,
- &x);
-
- /* Draw collision indicator */
- gdk_gc_set_foreground(drawing->gc, &drawing_colors[COL_WHITE]);
- gdk_draw_point(hashed_process_data->pixmap,
- drawing->gc,
- x,
- COLLISION_POSITION(hashed_process_data->height));
- hashed_process_data->x.middle_marked = TRUE;
- }
- } else {
- TimeWindow time_window =
- lttvwindow_get_time_window(control_flow_data->tab);