X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Finterrupts%2Finterrupts.c;h=035767136a969cee86693e6fa76355bf9dc7949c;hb=201fcc156aeee6cf7c1283c0163e47cb209cb78e;hp=2818875f650edc6553354be2bb7ef0db7994c6a9;hpb=8f72bb94f1601e9528a2b6baed83654707c8e52c;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c b/ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c index 2818875f..03576713 100644 --- a/ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c +++ b/ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c @@ -82,6 +82,7 @@ Xa: Frequency (Hz) #include #include #include +#include #include #include "hInterruptsInsert.xpm" @@ -133,7 +134,7 @@ enum type_t { static GSList *interrupt_data_list = NULL ; -#define TRACE_NUMBER 0 +//fixed #define TRACE_NUMBER 0 typedef struct _InterruptEventData { @@ -145,6 +146,7 @@ typedef struct _InterruptEventData { GtkTreeSelection *SelectionTree; Tab * tab; /* tab that contains this plug-in*/ + LttvPluginTab *ptab; LttvHooks * event_hooks; LttvHooks * hooks_trace_after; LttvHooks * hooks_trace_before; @@ -162,8 +164,8 @@ typedef struct _InterruptEventData { /* Function prototypes */ static gboolean interrupt_update_time_window(void * hook_data, void * call_data); -static GtkWidget *interrupts(Tab *tab); -static InterruptEventData *system_info(Tab *tab); +static GtkWidget *interrupts(LttvPlugin *plugin); +static InterruptEventData *system_info(LttvPluginTab *ptab); void interrupt_destructor(InterruptEventData *event_viewer_data); static void FirstRequest(InterruptEventData *event_data ); static guint64 get_interrupt_id(LttEvent *e); @@ -227,10 +229,10 @@ static void init() { * Constructor hook * */ -static GtkWidget *interrupts(Tab * tab) +static GtkWidget *interrupts(LttvPlugin *plugin) { - - InterruptEventData* event_data = system_info(tab) ; + LttvPluginTab *ptab = LTTV_PLUGIN_TAB(plugin); + InterruptEventData* event_data = system_info(ptab) ; if(event_data) return event_data->Hbox; else @@ -241,14 +243,15 @@ static GtkWidget *interrupts(Tab * tab) * This function initializes the Event Viewer functionnality through the * GTK API. */ -InterruptEventData *system_info(Tab *tab) +InterruptEventData *system_info(LttvPluginTab *ptab) { LttTime end; GtkTreeViewColumn *column; GtkCellRenderer *renderer; InterruptEventData* event_viewer_data = g_new(InterruptEventData,1) ; - + Tab *tab = ptab->tab; + event_viewer_data->ptab = ptab; event_viewer_data->tab = tab; /*Get the current time frame from the main window */ @@ -444,8 +447,8 @@ static void FirstRequest(InterruptEventData *event_data ) nb_trace = lttv_traceset_number(traceset); /* There are many traces in a traceset. Iteration for each trace. */ - for(i = 0; i