#include <gdk/gdk.h>
#include <string.h>
+#include <ltt/trace.h>
+
#include <lttv/lttv.h>
#include <lttv/tracecontext.h>
#include <lttvwindow/lttvwindow.h>
LttTime start, time_end;
LttTime window_end = time_window.end_time;
- g_debug("req : window start_time : %u, %u", time_window.start_time.tv_sec,
+ g_debug("req : window start_time : %lu, %lu", time_window.start_time.tv_sec,
time_window.start_time.tv_nsec);
- g_debug("req : window time width : %u, %u", time_window.time_width.tv_sec,
+ g_debug("req : window time width : %lu, %lu", time_window.time_width.tv_sec,
time_window.time_width.tv_nsec);
- g_debug("req : window_end : %u, %u", window_end.tv_sec,
+ g_debug("req : window_end : %lu, %lu", window_end.tv_sec,
window_end.tv_nsec);
g_debug("x is : %i, x+width is : %i", x, x+width);
LttvTraceHook hook;
- LttvAttributeValue val;
-
nb_trace = lttv_traceset_number(traceset);
// FIXME : eventually request for more traces
// for(i = 0 ; i < nb_trace ; i++) {
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 */
/* 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",
/* 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,
}
/* 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,
events_request->before_request = before_request_hook;
events_request->after_request = after_request_hook;
- g_debug("req : start : %u, %u", start.tv_sec,
+ g_debug("req : start : %lu, %lu", start.tv_sec,
start.tv_nsec);
- g_debug("req : end : %u, %u", time_end.tv_sec,
+ g_debug("req : end : %lu, %lu", time_end.tv_sec,
time_end.tv_nsec);
lttvwindow_events_request(tab, events_request);
LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
TimeWindow time_window =
lttvwindow_get_time_window(cfd->tab);
- LttTime end_time = time_window.end_time;
guint width = cfd->drawing->width;
guint x=0;
g_debug("Begin of chunk");
ControlFlowData *cfd = events_request->viewer_data;
LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
- LttTime current_time = lttv_traceset_context_get_current_tfc(tsc)->timestamp;
+ //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);
gint x, x_end, width;
ControlFlowData *cfd = events_request->viewer_data;
- LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
+ LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
Drawing_t *drawing = cfd->drawing;
TimeWindow time_window =
g_debug("request expose");
- LttTime window_end = time_window.end_time;
-
-#if 0
- convert_time_to_pixels(
- time_window,
- cfd->drawing->last_start,
- drawing->width,
- &x);
-
-#endif //0
convert_time_to_pixels(
time_window,
end_time,
drawing->width,
&x_end);
x = drawing->damage_begin;
- // x_end = drawing->damage_end;
+
width = x_end - x;
drawing->damage_begin = x+width;
- //drawing->damage_end = drawing->width;
- /* ask for the buffer to be redrawn */
-
- //gtk_widget_queue_draw_area ( drawing->drawing_area,
- // 0, 0,
- // drawing->width, drawing->height);
-
- /* FIXME
- * will need more precise pixel_to_time and time_to_pixel conversion
- * functions to redraw only the needed area. */
gtk_widget_queue_draw_area ( drawing->drawing_area,
x, 0,
width, drawing->height);
(ControlFlowData*)g_object_get_data(
G_OBJECT(widget),
"control_flow_data");
- if(drawing->gc == NULL) {
+ if(unlikely(drawing->gc == NULL)) {
drawing->gc = gdk_gc_new(drawing->drawing_area->window);
gdk_gc_copy(drawing->gc, drawing->drawing_area->style->black_gc);
}
{
LttTime time;
- LttTime window_end = time_window.end_time;
-
-
/* left mouse button click */
g_debug("x click is : %f", event->x);
drawing->width+SAFETY, drawing->height - y);
- if (drawing->pixmap)
+ if(likely(drawing->pixmap))
gdk_pixmap_unref(drawing->pixmap);
drawing->pixmap = pixmap;
- if(drawing->height==1) drawing->height = height;
+ if(unlikely(drawing->height==1)) drawing->height = height;
else drawing->height += height;
gtk_widget_set_size_request(drawing->drawing_area,
{
GdkPixmap *pixmap;
- if(drawing->height == height) {
+ if(unlikely((guint)drawing->height == height)) {
pixmap = gdk_pixmap_new(
drawing->drawing_area->window,
drawing->width + SAFETY,
drawing->height-=height;
}
- if (drawing->pixmap)
+ if(likely(drawing->pixmap))
gdk_pixmap_unref(drawing->pixmap);
drawing->pixmap = pixmap;
PangoContext *context;
PangoLayout *layout;
- PangoAttribute *attribute;
PangoFontDescription *FontDesc;
- gint Font_Size;
PangoRectangle ink_rect;
- guint global_width=0;
+ gint global_width=0;
GdkColor foreground = { 0, 0, 0, 0 };
GdkColor background = { 0, 0xffff, 0xffff, 0xffff };