{ 0, 0xFFFF, 0xFFFF, 0xFFFF }, /* COL_WHITE */
{ 0, 0x0FFF, 0xFFFF, 0xFFFF }, /* COL_WAIT_FORK : pale blue */
{ 0, 0xFFFF, 0xFFFF, 0x0000 }, /* COL_WAIT_CPU : yellow */
+ { 0, 0xFFFF, 0xA000, 0xFCFF }, /* COL_EXIT : pale magenta */
{ 0, 0xFFFF, 0x0000, 0xFFFF }, /* COL_ZOMBIE : purple */
{ 0, 0xFFFF, 0x0000, 0x0000 }, /* COL_WAIT : red */
{ 0, 0x0000, 0xFFFF, 0x0000 }, /* COL_RUN : green */
after_execmode_hook,
events_request,
LTTV_PRIO_STATE+5);
- lttv_hooks_add(event,
- after_fork_hook,
+ lttv_hooks_add(event,
+ before_process_hook,
+ events_request,
+ LTTV_PRIO_STATE-5);
+ lttv_hooks_add(event,
+ after_process_hook,
events_request,
LTTV_PRIO_STATE+5);
events_request->end_time = time_end;
events_request->num_events = G_MAXUINT;
events_request->end_position = NULL;
+ events_request->trace = 0; /* FIXME */
events_request->before_chunk_traceset = before_chunk_traceset;
events_request->before_chunk_trace = NULL;
events_request->before_chunk_tracefile = NULL;
}
+#if 0
+void
+tree_row_activated(GtkTreeModel *treemodel,
+ GtkTreePath *arg1,
+ GtkTreeViewColumn *arg2,
+ gpointer user_data)
+{
+ ControlFlowData *cfd = (ControlFlowData*)user_data;
+ Drawing_t *drawing = cfd->drawing;
+ GtkTreeView *treeview = cfd->process_list->process_list_widget;
+ gint *path_indices;
+ gint height;
+
+ path_indices = gtk_tree_path_get_indices (arg1);
+
+ height = get_cell_height(cfd->process_list,
+ GTK_TREE_VIEW(treeview));
+ drawing->horizontal_sel = height * path_indices[0];
+ g_critical("new hor sel : %i", drawing->horizontal_sel);
+}
+#endif //0
/* mouse click */
static gboolean
drawing->damage_begin = 0;
drawing->damage_end = 0;
+ drawing->horizontal_sel = -1;
//gtk_widget_set_size_request(drawing->drawing_area->window, 50, 50);
g_object_set_data_full(
*
* Convert from window pixel and time interval to an absolute time.
*/
-//FIXME : could need ceil and floor versions of this function
-void convert_pixels_to_time(
+__inline void convert_pixels_to_time(
gint width,
guint x,
LttTime window_time_begin,
LttTime *time)
{
LttTime window_time_interval;
+ guint64 time_ll;
window_time_interval = ltt_time_sub(window_time_end,
window_time_begin);
- *time = ltt_time_mul(window_time_interval, (x/(float)width));
+ time_ll = ltt_time_to_uint64(window_time_interval);
+ time_ll = time_ll * x / width;
+ *time = ltt_time_from_uint64(time_ll);
*time = ltt_time_add(window_time_begin, *time);
}
-//FIXME : could need ceil and floor versions of this function
-void convert_time_to_pixels(
+__inline void convert_time_to_pixels(
LttTime window_time_begin,
LttTime window_time_end,
LttTime time,
guint *x)
{
LttTime window_time_interval;
- double interval_double, time_double;
+ guint64 time_ll, interval_ll;
g_assert(ltt_time_compare(window_time_begin, time) <= 0 &&
ltt_time_compare(window_time_end, time) >= 0);
time = ltt_time_sub(time, window_time_begin);
- /* LttTime to double conversions here should really be under 4000 hours.. */
- interval_double = ltt_time_to_double(window_time_interval);
- time_double = ltt_time_to_double(time);
+ time_ll = ltt_time_to_uint64(time);
+ interval_ll = ltt_time_to_uint64(window_time_interval);
- *x = (guint)(time_double/interval_double * width);
+ *x = (guint)(time_ll * width / interval_ll);
}