From: compudj Date: Thu, 12 Aug 2004 14:40:29 +0000 (+0000) Subject: lttvwindow with per trace event delivery X-Git-Tag: v0.12.20~2777 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=54d8f654b0f1e1301f4e8a2bdc600bc370fff6f9;p=lttv.git lttvwindow with per trace event delivery git-svn-id: http://ltt.polymtl.ca/svn@712 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c index c504cf5b..d1b63100 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c @@ -186,6 +186,7 @@ void drawing_data_request(Drawing_t *drawing, 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; @@ -483,7 +484,7 @@ after_expose_event( GtkWidget *widget, GdkEventExpose *event, gpointer user_data } - +#if 0 void tree_row_activated(GtkTreeModel *treemodel, GtkTreePath *arg1, @@ -498,12 +499,12 @@ tree_row_activated(GtkTreeModel *treemodel, path_indices = gtk_tree_path_get_indices (arg1); - height = get_cell_height( + 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 diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c index db29cb8d..0a29dfe1 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c @@ -434,7 +434,7 @@ GtkWidget *processlist_get_widget(ProcessList *process_list) -__inline gint get_cell_height(ProcessList *process_list, GtkTreeView *tree_view) +static __inline gint get_cell_height(ProcessList *process_list, GtkTreeView *tree_view) { gint height = process_list->cell_height_cache; if(height != -1) return height; diff --git a/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c b/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c index 414a311b..40d18468 100644 --- a/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c +++ b/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c @@ -700,7 +700,7 @@ void v_scroll_cb (GtkAdjustment *adjustment, gpointer data) } } -gint get_cell_height(GtkTreeView *TreeView) +static __inline gint get_cell_height(GtkTreeView *TreeView) { gint height; GtkTreeViewColumn *column = gtk_tree_view_get_column(TreeView, 0); @@ -1613,6 +1613,7 @@ void get_events(EventViewerData* event_viewer_data, LttTime start, events_request->end_time = ltt_time_infinite; events_request->num_events = max_num_events; events_request->end_position = NULL; + events_request->trace = 0; /* FIXME */ events_request->before_chunk_traceset = NULL; events_request->before_chunk_trace = NULL; events_request->before_chunk_tracefile = NULL; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index 12b54c0b..0ef06eed 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -1223,11 +1223,27 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) /* 1.3.2 call before chunk * 1.3.3 events hooks added */ - lttv_process_traceset_begin(tsc, events_request->before_chunk_traceset, - events_request->before_chunk_trace, - events_request->before_chunk_tracefile, - events_request->event, - events_request->event_by_id); + if(events_request->trace == -1) + lttv_process_traceset_begin(tsc, + events_request->before_chunk_traceset, + events_request->before_chunk_trace, + events_request->before_chunk_tracefile, + events_request->event, + events_request->event_by_id); + else { + guint nb_trace = lttv_traceset_number(tsc->ts); + g_assert(events_request->trace < nb_trace && + events_request->trace > -1); + LttvTraceContext *tc = tsc->traces[events_request->trace]; + + lttv_hooks_call(events_request->before_chunk_traceset, tsc); + + lttv_trace_context_add_hooks(tc, + events_request->before_chunk_trace, + events_request->before_chunk_tracefile, + events_request->event, + events_request->event_by_id); + } } } } else { @@ -1244,11 +1260,27 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) /* - Call before chunk * - events hooks added */ - lttv_process_traceset_begin(tsc, events_request->before_chunk_traceset, + if(events_request->trace == -1) + lttv_process_traceset_begin(tsc, + events_request->before_chunk_traceset, + events_request->before_chunk_trace, + events_request->before_chunk_tracefile, + events_request->event, + events_request->event_by_id); + else { + guint nb_trace = lttv_traceset_number(tsc->ts); + g_assert(events_request->trace < nb_trace && + events_request->trace > -1); + LttvTraceContext *tc = tsc->traces[events_request->trace]; + + lttv_hooks_call(events_request->before_chunk_traceset, tsc); + + lttv_trace_context_add_hooks(tc, events_request->before_chunk_trace, events_request->before_chunk_tracefile, events_request->event, events_request->event_by_id); + } iter = g_slist_next(iter); } @@ -1292,11 +1324,29 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) /* call before chunk * events hooks added */ - lttv_process_traceset_begin(tsc, events_request->before_chunk_traceset, - events_request->before_chunk_trace, - events_request->before_chunk_tracefile, - events_request->event, - events_request->event_by_id); + if(events_request->trace == -1) + lttv_process_traceset_begin(tsc, + events_request->before_chunk_traceset, + events_request->before_chunk_trace, + events_request->before_chunk_tracefile, + events_request->event, + events_request->event_by_id); + else { + guint nb_trace = lttv_traceset_number(tsc->ts); + g_assert(events_request->trace < nb_trace && + events_request->trace > -1); + LttvTraceContext *tc = tsc->traces[events_request->trace]; + + lttv_hooks_call(events_request->before_chunk_traceset, tsc); + + lttv_trace_context_add_hooks(tc, + events_request->before_chunk_trace, + events_request->before_chunk_tracefile, + events_request->event, + events_request->event_by_id); + } + + } /* Go to next */ @@ -1426,11 +1476,31 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) /* - Remove events hooks for req * - Call end chunk for req */ - lttv_process_traceset_end(tsc, events_request->after_chunk_traceset, + + if(events_request->trace == -1) + lttv_process_traceset_end(tsc, + events_request->after_chunk_traceset, events_request->after_chunk_trace, events_request->after_chunk_tracefile, events_request->event, events_request->event_by_id); + + else { + guint nb_trace = lttv_traceset_number(tsc->ts); + g_assert(events_request->trace < nb_trace && + events_request->trace > -1); + LttvTraceContext *tc = tsc->traces[events_request->trace]; + + lttv_trace_context_remove_hooks(tc, + events_request->after_chunk_trace, + events_request->after_chunk_tracefile, + events_request->event, + events_request->event_by_id); + lttv_hooks_call(events_request->after_chunk_traceset, tsc); + + + } + /* - Call end request for req */ lttv_hooks_call(events_request->after_request, (gpointer)tsc); @@ -1465,12 +1535,29 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) /* - Remove events hooks for req * - Call end chunk for req */ - lttv_process_traceset_end(tsc, events_request->after_chunk_traceset, + if(events_request->trace == -1) + lttv_process_traceset_end(tsc, + events_request->after_chunk_traceset, events_request->after_chunk_trace, events_request->after_chunk_tracefile, events_request->event, events_request->event_by_id); + else { + guint nb_trace = lttv_traceset_number(tsc->ts); + g_assert(events_request->trace < nb_trace && + events_request->trace > -1); + LttvTraceContext *tc = tsc->traces[events_request->trace]; + + lttv_trace_context_remove_hooks(tc, + events_request->after_chunk_trace, + events_request->after_chunk_tracefile, + events_request->event, + events_request->event_by_id); + + lttv_hooks_call(events_request->after_chunk_traceset, tsc); + } + /* - req.num -= count */ g_assert(events_request->num_events >= count); events_request->num_events -= count; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h index 18e5853e..e0a969a2 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h @@ -601,6 +601,7 @@ typedef struct _EventsRequest { LttTime end_time; /* Unset : ltt_time_infinite*/ guint num_events; /* Unset : G_MAXUINT */ LttvTracesetContextPosition *end_position; /* Unset : NULL */ + gint trace; /* unset : -1 */ LttvHooks *before_chunk_traceset; /* Unset : NULL */ LttvHooks *before_chunk_trace; /* Unset : NULL */ LttvHooks *before_chunk_tracefile;/* Unset : NULL */