-//
-// /* Only draw for processes that are currently in the trace states */
-//
-// ProcessList *process_list = control_flow_data->process_list;
-//#ifdef EXTRA_CHECK
-// /* Should be alike when background info is ready */
-// if(control_flow_data->background_info_waiting==0)
-// g_assert(ltt_time_compare(process->creation_time,
-// process_info->birth) == 0);
-//#endif //EXTRA_CHECK
-//
-// /* 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(unlikely(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
-// Drawing_t *drawing = control_flow_data->drawing;
-// guint width = drawing->width;
-//
-// guint x = closure_data->x_end;
-//
-// DrawContext draw_context;
-//
-// /* Now create the drawing context that will be used to draw
-// * items related to the last state. */
-// draw_context.drawable = hashed_process_data->pixmap;
-// draw_context.gc = drawing->gc;
-// draw_context.pango_layout = drawing->pango_layout;
-// draw_context.drawinfo.end.x = x;
-//
-// draw_context.drawinfo.y.over = 1;
-// draw_context.drawinfo.y.middle = (hashed_process_data->height/2);
-// draw_context.drawinfo.y.under = hashed_process_data->height;
-//
-// draw_context.drawinfo.start.offset.over = 0;
-// draw_context.drawinfo.start.offset.middle = 0;
-// draw_context.drawinfo.start.offset.under = 0;
-// draw_context.drawinfo.end.offset.over = 0;
-// draw_context.drawinfo.end.offset.middle = 0;
-// draw_context.drawinfo.end.offset.under = 0;
-//#if 0
-// /* Jump over draw if we are at the same x position */
-// if(x == hashed_process_data->x.over)
-// {
-// /* jump */
-// } else {
-// draw_context.drawinfo.start.x = hashed_process_data->x.over;
-// /* Draw the line */
-// PropertiesLine prop_line = prepare_execmode_line(process);
-// draw_line((void*)&prop_line, (void*)&draw_context);
-//
-// hashed_process_data->x.over = x;
-// }
-//#endif //0
-//
-// if(unlikely(x == hashed_process_data->x.middle &&
-// hashed_process_data->x.middle_used)) {
-//#if 0 /* do not mark closure : not missing information */
-// if(hashed_process_data->x.middle_marked == FALSE) {
-// /* Draw collision indicator */
-// gdk_gc_set_foreground(drawing->gc, &drawing_colors[COL_WHITE]);
-// gdk_draw_point(drawing->pixmap,
-// drawing->gc,
-// x,
-// y+(height/2)-3);
-// hashed_process_data->x.middle_marked = TRUE;
-// }
-//#endif //0
-// /* Jump */
-// } else {
-// draw_context.drawinfo.start.x = hashed_process_data->x.middle;
-// /* Draw the line */
-// if(dodraw) {
-// PropertiesLine prop_line = prepare_s_e_line(process);
-// draw_line((void*)&prop_line, (void*)&draw_context);
-// }
-//
-// /* become the last x position */
-// if(likely(x != hashed_process_data->x.middle)) {
-// hashed_process_data->x.middle = x;
-// /* but don't use the pixel */
-// hashed_process_data->x.middle_used = FALSE;
-//
-// /* Calculate the next good time */
-// convert_pixels_to_time(width, x+1, time_window,
-// &hashed_process_data->next_good_time);
-// }
-// }
-// }
+
+ /* Only draw for processes that are currently in the trace states */
+
+ ProcessList *process_list = control_flow_data->process_list;
+#ifdef EXTRA_CHECK
+ /* Should be alike when background info is ready */
+ if(control_flow_data->background_info_waiting==0)
+ g_assert(ltt_time_compare(process->creation_time,
+ process_info->birth) == 0);
+#endif //EXTRA_CHECK
+
+ /* 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(unlikely(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
+ Drawing_t *drawing = control_flow_data->drawing;
+ guint width = drawing->width;
+
+ guint x = closure_data->x_end;
+
+ DrawContext draw_context;
+
+ /* Now create the drawing context that will be used to draw
+ * items related to the last state. */
+ draw_context.drawable = hashed_process_data->pixmap;
+ draw_context.gc = drawing->gc;
+ draw_context.pango_layout = drawing->pango_layout;
+ draw_context.drawinfo.end.x = x;
+
+ draw_context.drawinfo.y.over = 1;
+ draw_context.drawinfo.y.middle = (hashed_process_data->height/2);
+ draw_context.drawinfo.y.under = hashed_process_data->height;
+
+ draw_context.drawinfo.start.offset.over = 0;
+ draw_context.drawinfo.start.offset.middle = 0;
+ draw_context.drawinfo.start.offset.under = 0;
+ draw_context.drawinfo.end.offset.over = 0;
+ draw_context.drawinfo.end.offset.middle = 0;
+ draw_context.drawinfo.end.offset.under = 0;
+#if 0
+ /* Jump over draw if we are at the same x position */
+ if(x == hashed_process_data->x.over)
+ {
+ /* jump */
+ } else {
+ draw_context.drawinfo.start.x = hashed_process_data->x.over;
+ /* Draw the line */
+ PropertiesLine prop_line = prepare_execmode_line(process);
+ draw_line((void*)&prop_line, (void*)&draw_context);
+
+ hashed_process_data->x.over = x;
+ }
+#endif //0
+
+ if(unlikely(x == hashed_process_data->x.middle &&
+ hashed_process_data->x.middle_used)) {
+#if 0 /* do not mark closure : not missing information */
+ if(hashed_process_data->x.middle_marked == FALSE) {
+ /* Draw collision indicator */
+ gdk_gc_set_foreground(drawing->gc, &drawing_colors[COL_WHITE]);
+ gdk_draw_point(drawing->pixmap,
+ drawing->gc,
+ x,
+ y+(height/2)-3);
+ hashed_process_data->x.middle_marked = TRUE;
+ }
+#endif //0
+ /* Jump */
+ } else {
+ draw_context.drawinfo.start.x = hashed_process_data->x.middle;
+ /* Draw the line */
+ if(dodraw) {
+// PropertiesLine prop_line = prepare_s_e_line(process);
+ PropertiesLine prop_line;
+ prop_line.line_width = STATE_LINE_WIDTH;
+ prop_line.style = GDK_LINE_SOLID;
+ prop_line.y = MIDDLE;
+/* if(pid_out == 0) {
+ prop_line.color = drawing_colors_cpu[COL_IDLE];
+ }
+ else {
+ prop_line.color = drawing_colors_cpu[COL_BUSY];
+ }
+*/
+ //prop_line.color = drawing_colors_cpu[COL_CPU_UNKNOWN];
+ if(ts->cpu_states[process_info->id].present_state == LTTV_CPU_IDLE) {
+ prop_line.color = drawing_colors_cpu[COL_CPU_IDLE];
+ }
+ else {
+ prop_line.color = drawing_colors_cpu[COL_CPU_BUSY];
+ }
+
+ draw_line((void*)&prop_line, (void*)&draw_context);
+ }
+
+ /* become the last x position */
+ if(likely(x != hashed_process_data->x.middle)) {
+ hashed_process_data->x.middle = x;
+ /* but don't use the pixel */
+ hashed_process_data->x.middle_used = FALSE;
+
+ /* Calculate the next good time */
+ convert_pixels_to_time(width, x+1, time_window,
+ &hashed_process_data->next_good_time);
+ }
+ }
+ }