keep current process : y position shorter to find
[lttv.git] / ltt / branches / poly / lttv / modules / gui / controlflow / drawing.c
index 1f4100ee96d5c33d05ef13a8491ce3f172804384..f9fca3e7b428491b11150584a33039052fc325ce 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <gtk/gtk.h>
 #include <gdk/gdk.h>
+#include <string.h>
 
 #include <lttv/lttv.h>
 #include <lttv/tracecontext.h>
@@ -144,6 +145,8 @@ void drawing_data_request(Drawing_t *drawing,
   convert_pixels_to_time(drawing->width, x+width,
         time_window,
         &time_end);
+  time_end = ltt_time_add(time_end, ltt_time_one); // because main window
+                                                   // doesn't deliver end time.
 
   lttvwindow_events_request_remove_all(tab,
                                        control_flow_data);
@@ -410,6 +413,7 @@ void drawing_data_request_begin(EventsRequest *events_request, LttvTracesetState
 
   g_hash_table_foreach(cfd->process_list->process_hash, set_last_start,
                             (gpointer)x);
+
 }
 
 void drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss)
@@ -418,7 +422,12 @@ void drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss)
   ControlFlowData *cfd = events_request->viewer_data;
   LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
   LttTime current_time = lttv_traceset_context_get_current_tfc(tsc)->timestamp;
+  guint num_cpu = 
+    ltt_trace_per_cpu_tracefile_number(tss->parent.traces[TRACE_NUMBER]->t);
 
+  cfd->process_list->current_hash_data = g_new(HashedProcessData*,num_cpu);
+  memset(cfd->process_list->current_hash_data, 0,
+         sizeof(HashedProcessData*)*num_cpu);
   //cfd->drawing->last_start = LTT_TIME_MIN(current_time,
   //                                        events_request->end_time);
 }
@@ -917,7 +926,7 @@ GtkWidget *drawing_get_widget(Drawing_t *drawing)
  *
  * Convert from window pixel and time interval to an absolute time.
  */
-__inline void convert_pixels_to_time(
+__inline__ void convert_pixels_to_time(
     gint width,
     guint x,
     TimeWindow time_window,
@@ -932,7 +941,7 @@ __inline void convert_pixels_to_time(
 }
 
 
-__inline void convert_time_to_pixels(
+__inline__ void convert_time_to_pixels(
     TimeWindow time_window,
     LttTime time,
     int width,
This page took 0.023123 seconds and 4 git commands to generate.