X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fcontrolflow%2Fdrawing.c;h=7eecd71dbba2ef35fb52f7bd4f550eedd9b0f9b2;hb=96947fcfd1323ffb5e9f2ac484adb4432b69e90c;hp=33a8124b9f8d5e8bfcd0b2117de14a3840ac53ac;hpb=8869ac083d37f2b2777ef64a25fddadf009e13dd;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c index 33a8124b..7eecd71d 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c @@ -29,7 +29,6 @@ #include "drawing.h" #include "eventhooks.h" #include "cfv.h" -#include "cfv-private.h" #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format) #define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format) @@ -210,7 +209,7 @@ void drawing_data_request(Drawing_t *drawing, associated by id hooks. */ hooks = g_array_new(FALSE, FALSE, sizeof(LttvTraceHook)); - g_array_set_size(hooks, 15); + g_array_set_size(hooks, 10); /* before hooks */ @@ -250,33 +249,38 @@ void drawing_data_request(Drawing_t *drawing, /* after hooks */ +#if 0 + /**** DESACTIVATED ****/ lttv_trace_find_hook(ts->parent.t, "core","syscall_entry","syscall_id", NULL, NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 8)); -#if 0 /**** DESACTIVATED ****/ lttv_trace_find_hook(ts->parent.t, "core", "syscall_exit", NULL, NULL, NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 9)); -#endif //0 + /**** DESACTIVATED ****/ lttv_trace_find_hook(ts->parent.t, "core", "trap_entry", "trap_id", - NULL, NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 9)); + NULL, NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 10)); + /**** DESACTIVATED ****/ lttv_trace_find_hook(ts->parent.t, "core", "trap_exit", NULL, NULL, NULL, - after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 10)); + after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 11)); + /**** DESACTIVATED ****/ lttv_trace_find_hook(ts->parent.t, "core", "irq_entry", "irq_id", NULL, - NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 11)); + NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 12)); + /**** DESACTIVATED ****/ lttv_trace_find_hook(ts->parent.t, "core", "irq_exit", NULL, NULL, NULL, - after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 12)); + after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 13)); +#endif //0 lttv_trace_find_hook(ts->parent.t, "core", "schedchange", "in", "out", "out_state", after_schedchange_hook, - &g_array_index(hooks, LttvTraceHook, 13)); + &g_array_index(hooks, LttvTraceHook, 8)); lttv_trace_find_hook(ts->parent.t, "core", "process", "event_sub_id", "event_data1", "event_data2", after_process_hook, - &g_array_index(hooks, LttvTraceHook, 14)); + &g_array_index(hooks, LttvTraceHook, 9)); #if 0 lttv_trace_find_hook(ts->parent.t, "core", "process_fork", "child_pid", @@ -290,7 +294,7 @@ void drawing_data_request(Drawing_t *drawing, /* Add these hooks to each event_by_id hooks list */ /* add before */ - for(k = 0 ; k < hooks->len/2 ; k++) { + for(k = 0 ; k < 8 ; k++) { hook = g_array_index(hooks, LttvTraceHook, k); lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, hook.id), hook.h, @@ -299,7 +303,7 @@ void drawing_data_request(Drawing_t *drawing, } /* add after */ - for(k = hooks->len/2 ; k < hooks->len ; k++) { + for(k = 8 ; k < 10 ; k++) { hook = g_array_index(hooks, LttvTraceHook, k); lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, hook.id), hook.h, @@ -924,50 +928,6 @@ GtkWidget *drawing_get_widget(Drawing_t *drawing) return drawing->vbox; } -/* convert_pixels_to_time - * - * Convert from window pixel and time interval to an absolute time. - */ -__inline__ void convert_pixels_to_time( - gint width, - guint x, - TimeWindow time_window, - LttTime *time) -{ - double time_d; - - time_d = time_window.time_width_double; - time_d = time_d / (double)width * (double)x; - *time = ltt_time_from_double(time_d); - *time = ltt_time_add(time_window.start_time, *time); -} - - -__inline__ void convert_time_to_pixels( - TimeWindow time_window, - LttTime time, - int width, - guint *x) -{ - double time_d; -#ifdef EXTRA_CHECK - g_assert(ltt_time_compare(window_time_begin, time) <= 0 && - ltt_time_compare(window_time_end, time) >= 0); -#endif //EXTRA_CHECK - - time = ltt_time_sub(time, time_window.start_time); - - time_d = ltt_time_to_double(time); - - if(time_window.time_width_double == 0.0) { - g_assert(time_d == 0.0); - *x = 0; - } else { - *x = (guint)(time_d / time_window.time_width_double * (double)width); - } - -} - void drawing_draw_line( Drawing_t *drawing, GdkPixmap *pixmap, guint x1, guint y1,