Mostly unused variables.
Big removal of unused and commented code in histoeventhooks.c, but this
code already exists in other modules so we could add it back easily if
we wanted to add more functionality.
Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#endif
#include <glib.h>
+#include <glib/gprintf.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <lttv/lttv.h>
static void property_button (GtkToolButton *toolbutton,
gpointer user_data)
{
- ControlFlowData *control_flow_data = (ControlFlowData*)user_data;
-
g_printf("CFV Property button clicked\n");
}
{
/* find the tracehooks */
LttvTracesetContext *tsc = lttvwindow_get_traceset_context(tab);
-
LttvTraceset *traceset = tsc->ts;
-
- guint i, k, l, nb_trace;
-
+ guint i, k, nb_trace;
LttvTraceState *ts;
-
- LttvTracefileState *tfs;
-
GArray *hooks;
-
LttvTraceHook *th;
-
- guint ret;
gint first_after;
nb_trace = lttv_traceset_number(traceset);
static void set_last_start(gpointer key, gpointer value, gpointer user_data)
{
- ProcessInfo *process_info = (ProcessInfo*)key;
HashedProcessData *hashed_process_data = (HashedProcessData*)value;
guint x = GPOINTER_TO_UINT(user_data);
{
g_debug("Begin of data request");
ControlFlowData *cfd = events_request->viewer_data;
- LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
TimeWindow time_window =
lttvwindow_get_time_window(cfd->tab);
guint x_end;
ControlFlowData *cfd = events_request->viewer_data;
- LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
Drawing_t *drawing = cfd->drawing;
TimeWindow time_window =
static gint background_ready(void *hook_data, void *call_data)
{
ControlFlowData *control_flow_data = (ControlFlowData *)hook_data;
- LttvTrace *trace = (LttvTrace*)call_data;
control_flow_data->background_info_waiting--;
int event_selected_hook(void *hook_data, void *call_data)
{
- ControlFlowData *control_flow_data = (ControlFlowData*) hook_data;
guint *event_number = (guint*) call_data;
g_debug("DEBUG : event selected by main window : %u", *event_number);
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttvTracefileState *tfs = (LttvTracefileState *)call_data;
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
LttEvent *e = ltt_tracefile_get_event(tfc->tf);
* draw items from the beginning of the read for it. If it is not
* present, it's a new process and it was not present : it will
* be added after the state update. TOCHECK: What does that last para mean? */
- guint cpu = tfs->cpu;
guint trace_num = ts->parent.index;
LttvProcessState *process = lttv_state_find_process(ts, woken_cpu, woken_pid);
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttvTracefileState *tfs = (LttvTracefileState *)call_data;
-
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
LttEvent *e;
if(process != NULL) {
LttTime birth;
- guint pl_height = 0;
HashedProcessData *hashed_process_data = NULL;
ProcessList *process_list = control_flow_data->process_list;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttvTracefileState *tfs = (LttvTracefileState *)call_data;
-
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
LttEvent *e;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttvTracefileState *tfs = (LttvTracefileState *)call_data;
-
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
guint first_cpu, nb_cpus, cpu;
tfc->t_context->t,tfc,NULL,NULL))
return FALSE;
- LttTime evtime = ltt_event_time(e);
-
/* Add process to process list (if not present) */
LttvProcessState *process_in;
LttTime birth;
/* Same scale (scrolling) */
g_info("scrolling");
LttTime *ns = &new_time_window->start_time;
- LttTime *nw = &new_time_window->time_width;
LttTime *os = &old_time_window->start_time;
- LttTime *ow = &old_time_window->time_width;
LttTime old_end = old_time_window->end_time;
LttTime new_end = new_time_window->end_time;
//if(ns<os+w<ns+w)
gint update_current_time_hook(void *hook_data, void *call_data)
{
ControlFlowData *control_flow_data = (ControlFlowData*)hook_data;
- Drawing_t *drawing = control_flow_data->drawing;
LttTime current_time = *((LttTime*)call_data);
/* Only draw for processes that are currently in the trace states */
- ProcessList *process_list = control_flow_data->process_list;
#ifdef EXTRA_CHECK
/* Should be alike when background info is ready */
if(control_flow_data->background_info_waiting==0)
{
EventsRequest *events_request = (EventsRequest*)hook_data;
LttvTracesetState *tss = (LttvTracesetState*)call_data;
- ControlFlowData *cfd = (ControlFlowData*)events_request->viewer_data;
#if 0
/* Desactivate sort */
gtk_tree_sortable_set_sort_column_id(
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttvTracefileState *tfs = (LttvTracefileState *)call_data;
-
- LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
-
LttvTracesetState *tss = (LttvTracesetState*)tfc->t_context->ts_context;
ProcessList *process_list = control_flow_data->process_list;
sizeof (LttvPluginCFVClass),
NULL, /* base_init */
NULL, /* base_finalize */
- lttv_plugin_cfv_class_init, /* class_init */
+ (GClassInitFunc) lttv_plugin_cfv_class_init, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (LttvPluginCFV),
(ControlFlowData*)g_object_get_data(
G_OBJECT(widget),
"control_flow_data");
- Drawing_t *drawing = control_flow_data->drawing;
- unsigned int cell_height =
- get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
+ unsigned int cell_height =
+ get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
switch(event->direction) {
case GDK_SCROLL_UP:
default:
g_error("should only scroll up and down.");
}
- return TRUE;
+ return TRUE;
}
#include <math.h>
#include <glib.h>
+#include <glib/gprintf.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
static gint background_ready(void *hook_data, void *call_data)
{
EventViewerData *event_viewer_data = (EventViewerData *)hook_data;
- LttvTrace *trace = (LttvTrace*)call_data;
event_viewer_data->background_info_waiting--;
void tree_v_set_cursor(EventViewerData *event_viewer_data)
{
- GtkTreePath *path;
-
g_debug("set cursor cb");
#if 0
void tree_v_get_cursor(EventViewerData *event_viewer_data)
{
- GtkTreePath *path;
- gint *indices;
-
g_debug("get cursor cb");
gpointer data)
{
GtkTreePath *path; // = gtk_tree_path_new();
- gint *indices;
- gdouble value;
EventViewerData *event_viewer_data = (EventViewerData*)data;
g_debug("move cursor cb");
gboolean tree_v_scroll_handler (GtkWidget *widget, GdkEventScroll *event, gpointer data)
{
EventViewerData *event_viewer_data = (EventViewerData*) data;
- Tab *tab = event_viewer_data->tab;
switch(event->direction) {
case GDK_SCROLL_UP:
gpointer data)
{
g_debug("tree sel changed cb");
- EventViewerData *event_viewer_data = (EventViewerData*) data;
#if 0
/* Set the cursor to currently selected event */
void v_scroll_cb (GtkAdjustment *adjustment, gpointer data)
{
EventViewerData *event_viewer_data = (EventViewerData*)data;
- LttvTracesetStats *tss =
- lttvwindow_get_traceset_stats(event_viewer_data->tab);
- LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
g_debug("SCROLL begin");
g_debug("SCROLL values : %g , %g, %g",
adjustment->value, event_viewer_data->previous_value,
static void get_events(double new_value, EventViewerData *event_viewer_data)
{
- GtkTreePath *tree_path;
LttvTracesetStats *tss =
lttvwindow_get_traceset_stats(event_viewer_data->tab);
LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
const LttTime * current_time = (LttTime*)call_data;
LttvTracesetContext * tsc =
lttvwindow_get_traceset_context(event_viewer_data->tab);
- GtkTreePath *path;
/* If the currently selected event time != current time, set the first event
* with this time as currently selected. */
gboolean filter_changed(void * hook_data, void * call_data)
{
EventViewerData *event_viewer_data = (EventViewerData*) hook_data;
- LttvTracesetContext * tsc =
- lttvwindow_get_traceset_context(event_viewer_data->tab);
event_viewer_data->main_win_filter =
(LttvFilter*)call_data;
sizeof (LttvPluginEVDClass),
NULL, /* base_init */
NULL, /* base_finalize */
- lttv_plugin_evd_class_init, /* class_init */
+ (GClassInitFunc) lttv_plugin_evd_class_init, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (LttvPluginEVD),
g_debug("filter::gui_filter()");
unsigned i;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
FilterViewerData* fvd = g_new(FilterViewerData,1);
GtkWidget *
h_guifilter(LttvPlugin *plugin)
{
- FilterViewerData* f = gui_filter(plugin) ;
-
return NULL;
}
void histo_buttonwidget_destroy(ButtonWidget *buttonwidget);
-
-static gboolean gplus( GtkWidget *widget,gpointer user_data);//assigned to zoomIn
-static gboolean gMinus( GtkWidget *widget,gpointer user_data );//assigned to zoomOut
-static gboolean gFit( GtkWidget *widget,gpointer user_data );//assigned to zoomFit
-
GtkWidget *histo_buttonwidget_get_widget(ButtonWidget *button_widget);
void histo_update_pixmap_size(histoDrawing_t *value,
guint width);
#include <gdk/gdk.h>
#include <lttv/lttv.h>
#include <lttvwindow/lttvwindow.h>
+#include <lttvwindow/lttvwindowtraces.h>
#include "histocfv.h"
#include "histodrawing.h"
extern GSList *g_histo_control_flow_data_list;
-static gboolean
-header_size_allocate(GtkWidget *widget,
- GtkAllocation *allocation,
- gpointer user_data)
-{
- histoDrawing_t *drawing = (histoDrawing_t*)user_data;
-
- gtk_widget_set_size_request(drawing->ruler, -1, allocation->height);
- //gtk_widget_queue_resize(drawing->padding);
- //gtk_widget_queue_resize(drawing->ruler);
- gtk_container_check_resize(GTK_CONTAINER(drawing->ruler_hbox));
- return 0;
-}
-
/*****************************************************************************
* Histo Control Flow Viewer class implementation *
{
g_debug("Begin of data request");
HistoControlFlowData *cfd = events_request->viewer_data;
- LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
TimeWindow time_window =
lttvwindow_get_time_window(cfd->tab);
{
g_debug("Begin of chunk");
HistoControlFlowData *cfd = events_request->viewer_data;
- LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
if(cfd->chunk_has_begun) return;
histoDrawing_t *drawing = cfd->drawing;
guint x, x_end, width;
- LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
TimeWindow time_window =
lttvwindow_get_time_window(cfd->tab);
void histo_drawing_clear(histoDrawing_t *drawing,guint clear_from,guint clear_to)
{
-
- HistoControlFlowData *cfd = drawing->histo_control_flow_data;
guint clear_width = clear_to- clear_from;
/*
//disabled for histogram
GdkColor foreground = { 0, 0, 0, 0 };
GdkColor background = { 0, 0xffff, 0xffff, 0xffff };
GdkColor red ={ 0, 0xFFFF, 0x1E00, 0x1000 };
- GdkColor magneta ={ 0, 0x8900, 0x0000, 0x8400 };
+ //GdkColor magneta ={ 0, 0x8900, 0x0000, 0x8400 };
g_debug("vertical ruler expose event");
gdk_draw_rectangle (drawing->vertical_ruler->window,
/* Clear the drawing : make it 1xwidth. */
void histo_drawing_clear(histoDrawing_t *drawing,guint clear_from,guint clear_to);
-/* Insert a square corresponding to a new process in the list */
-static void drawing_insert_square(histoDrawing_t *drawing,
- guint y,
- guint height);
-
-/* Remove a square corresponding to a removed process in the list */
-static void drawing_remove_square(histoDrawing_t *drawing,
- guint y,
- guint height);
-
void histo_drawing_update_ruler(histoDrawing_t *drawing, TimeWindow *time_window);
void histo_drawing_update_vertical_ruler(histoDrawing_t *drawing);//, TimeWindow *time_window);
void histo_drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss);
-
-static void
-tree_row_activated(GtkTreeModel *treemodel,
- GtkTreePath *arg1,
- GtkTreeViewColumn *arg2,
- gpointer user_data);
-
-
/* histo_convert_pixels_to_time
*
* Convert from window pixel and time interval to an absolute time.
#include <lttv/lttv.h>
#include "histodrawitem.h"
+#include "histodrawing.h"
#define MAX_PATH_LEN 256
// fixed #define TRACE_NUMBER 0
#define EXTRA_ALLOC 1024 // pixels
-/* Action to do when background computation completed.
- *
- * Wait for all the awaited computations to be over.
- */
-
-static gint histo_background_ready(void *hook_data, void *call_data)
-{
- HistoControlFlowData *histocontrol_flow_data = (HistoControlFlowData *)hook_data;
- LttvTrace *trace = (LttvTrace*)call_data;
-
- histoDrawing_t *drawing = histocontrol_flow_data->drawing;
- histocontrol_flow_data->background_info_waiting--;
-
- if(histocontrol_flow_data->background_info_waiting == 0) {
- g_message("Histocontrol flow viewer : background computation data ready.");
-
- histo_drawing_clear(drawing,0,drawing->width);
-
- gtk_widget_set_size_request(drawing->drawing_area,
- -1, -1);
- histo_redraw_notify(histocontrol_flow_data, NULL);
- }
-
- return 0;
-}
-
-
-/* Request background computation. Verify if it is in progress or ready first.
- * Only for each trace in the tab's traceset.
+/*
+ * Most functions here are inspired from the controlflow module.
+ * Look in gui/controlflow/eventhooks.c if you need to add more functionality
*/
-static void histo_request_background_data(HistoControlFlowData *histocontrol_flow_data)
-{
- LttvTracesetContext * tsc =
- lttvwindow_get_traceset_context(histocontrol_flow_data->tab);
- gint num_traces = lttv_traceset_number(tsc->ts);
- gint i;
- LttvTrace *trace;
- LttvTraceState *tstate;
-
- LttvHooks *histo_background_ready_hook =
- lttv_hooks_new();
- lttv_hooks_add(histo_background_ready_hook, histo_background_ready, histocontrol_flow_data,
- LTTV_PRIO_DEFAULT);
- histocontrol_flow_data->background_info_waiting = 0;
-
- for(i=0;i<num_traces;i++) {
- trace = lttv_traceset_get(tsc->ts, i);
- tstate = LTTV_TRACE_STATE(tsc->traces[i]);
-
- if(lttvwindowtraces_get_ready(g_quark_from_string("state"),trace)==FALSE
- && !tstate->has_precomputed_states) {
-
- if(lttvwindowtraces_get_in_progress(g_quark_from_string("state"),
- trace) == FALSE) {
- /* We first remove requests that could have been done for the same
- * information. Happens when two viewers ask for it before servicing
- * starts.
- */
- if(!lttvwindowtraces_background_request_find(trace, "state"))
- lttvwindowtraces_background_request_queue(
- main_window_get_widget(histocontrol_flow_data->tab), trace, "state");
- lttvwindowtraces_background_notify_queue(histocontrol_flow_data,
- trace,
- ltt_time_infinite,
- NULL,
- histo_background_ready_hook);
- histocontrol_flow_data->background_info_waiting++;
- } else { /* in progress */
-
- lttvwindowtraces_background_notify_current(histocontrol_flow_data,
- trace,
- ltt_time_infinite,
- NULL,
- histo_background_ready_hook);
- histocontrol_flow_data->background_info_waiting++;
- }
- } else {
- /* Data ready. Be its nature, this viewer doesn't need to have
- * its data ready hook called there, because a background
- * request is always linked with a redraw.
- */
- }
-
- }
-
- lttv_hooks_destroy(histo_background_ready_hook);
-}
/**
* Histogram Viewer's constructor hook
int histo_count_event(void *hook_data, void *call_data){
guint x;//time to pixel
- guint i;// number of events
LttTime event_time;
LttEvent *e;
guint *element;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttvTracefileState *tfs = (LttvTracefileState *)call_data;
e = ltt_tracefile_get_event(tfc->tf);
GDK_JOIN_MITER);*/
//clean the area!
histo_drawing_clear(drawing,draw_begin,draw_end);
- LttTime t1,t2;
+ LttTime t1, t2;
TimeWindow time_window =
lttvwindow_get_time_window(histocontrol_flow_data->tab);
- guint val,h_val;
+ guint val, h_val;
- guint i,line_src,line_end;
+ guint i, line_src;
guint end_chunk=MIN(draw_end,(histocontrol_flow_data->number_of_process)->len);
for (i=draw_begin/*0*/;i<end_chunk/* (histocontrol_flow_data->number_of_process)->len*/;i++){
int histo_event_selected_hook(void *hook_data, void *call_data)
{
- HistoControlFlowData *histocontrol_flow_data = (HistoControlFlowData*) hook_data;
guint *event_number = (guint*) call_data;
g_debug("DEBUG : event selected by main window : %u", *event_number);
//show number of event at current time
histo_drawing_update_vertical_ruler(drawing);
-
-#if 0
-
-/*// if( histo_new_time_window->time_width.tv_sec == histo_old_time_window->time_width.tv_sec
- && histo_new_time_window->time_width.tv_nsec == histo_old_time_window->time_width.tv_nsec)
- {
- // Same scale (scrolling)
- g_info("scrolling");
- /* For histogram,
- while scrolling no matter far or near ,
- right or left it's necessary to redraw whole screen!*/
-/*// LttTime *ns = &histo_new_time_window->start_time;
- LttTime *nw = &histo_new_time_window->time_width;
- LttTime *os = &histo_old_time_window->start_time;
- LttTime *ow = &histo_old_time_window->time_width;
- LttTime histo_old_end = histo_old_time_window->end_time;
- LttTime histo_new_end = histo_new_time_window->end_time;
- //if(ns<os+w<ns+w)
- //if(ns<os+w && os+w<ns+w)
- //if(ns<histo_old_end && os<ns)
-
- //added for histogram
- gtk_widget_queue_draw(drawing->drawing_area);
-
- drawing->damage_begin = 0;
- drawing->damage_end = drawing->width;
-
- //replaced for hisogram
- histo_request_event(histocontrol_flow_data,drawing->damage_begin,
- drawing->damage_end- drawing->damage_begin);
-/*
- if(ltt_time_compare(*ns, histo_old_end) == -1
- && ltt_time_compare(*os, *ns) == -1)
- {
- g_info("scrolling near right");
- // Scroll right, keep right part of the screen
- guint x = 0;
- guint width = drawing->width;
- histo_convert_time_to_pixels(
- *histo_old_time_window,
- *ns,
- width,
- &x);
-
- // Copy old data to new location
- //replaced for histogram:
- histo_copy_pixmap_region(drawing,NULL,
- drawing->drawing_area->style->black_gc,//drawing->gc,
- NULL,
- x, 0,
- 0, 0, (drawing->width-x)
- , -1);
-
- if(drawing->damage_begin == drawing->damage_end)
- drawing->damage_begin = drawing->width-x;
- else
- drawing->damage_begin = 0;
-
- drawing->damage_end = drawing->width;
-
-//(histo) copy corresponding array region too:
- guint i;
-
- for(i=0; i < histocontrol_flow_data->number_of_process->len-x;i++)
- {
- g_array_index(histocontrol_flow_data->number_of_process, guint, i) =
- g_array_index(histocontrol_flow_data->number_of_process, guint, i+x);
- }
-
- // Clear the data request background, but not SAFETY
-
-
-//not necessary for histo, because in before chunk ,it clears the area
-/* histo_rectangle_pixmap (
- drawing->drawing_area->style->black_gc,
- TRUE,
- drawing->damage_begin, 0,
- drawing->damage_end - drawing->damage_begin, // do not overlap
- -1,drawing);
-*/
- /* gtk_widget_queue_draw(drawing->drawing_area);
- //gtk_widget_queue_draw_area (drawing->drawing_area,
- // 0,0,
- // histocontrol_flow_data->drawing->width,
- // histocontrol_flow_data->drawing->height);
-
- // Get new data for the rest.
- //replaced for hisogram
- histo_request_event(histocontrol_flow_data,drawing->damage_begin,
- drawing->damage_end- drawing->damage_begin);
- } else {
- //if(ns<os<ns+w)
- //if(ns<os && os<ns+w)
- //if(ns<os && os<histo_new_end)
- if(ltt_time_compare(*ns,*os) == -1
- && ltt_time_compare(*os,histo_new_end) == -1)
- {
- g_info("scrolling near left");
- // Scroll left, keep left part of the screen
- guint x = 0;
- guint width = drawing->width;
- histo_convert_time_to_pixels(
- *histo_new_time_window,
- *os,
- width,
- &x);
-
- // Copy old data to new location
- //replaced for histogram
-
- histo_copy_pixmap_region(drawing,NULL,
- drawing->drawing_area->style->black_gc,//drawing->gc,
- NULL,
- 0, 0,
- x, 0, -1, -1);
- //(histo) copy corresponding array region too:
- guint i;
- for(i=histocontrol_flow_data->number_of_process->len; i > x-1;i--)
- {
- g_array_index(histocontrol_flow_data->number_of_process, guint, i) =
- g_array_index(histocontrol_flow_data->number_of_process, guint, i-x);
- }
-
- if(drawing->damage_begin == drawing->damage_end)
- drawing->damage_end = x;
- else
- drawing->damage_end =
- drawing->width;
-
- drawing->damage_begin = 0;
-
-
-//not necessary for histo, because in before chunk ,it clears the area
- /* histo_rectangle_pixmap (drawing->drawing_area->style->black_gc,
- TRUE,
- drawing->damage_begin, 0,
- drawing->damage_end - drawing->damage_begin, // do not overlap
- -1,drawing);
-*/
- /* gtk_widget_queue_draw(drawing->drawing_area);
- //gtk_widget_queue_draw_area (drawing->drawing_area,
- // 0,0,
- // histocontrol_flow_data->drawing->width,
- // histocontrol_flow_data->drawing->height);
-
-
- // Get new data for the rest.
-
-//replaced for hisogram
- histo_request_event(histocontrol_flow_data,drawing->damage_begin,
- drawing->damage_end- drawing->damage_begin);
-
- } else {
- if(ltt_time_compare(*ns,*os) == 0)
- {
- g_info("not scrolling");
- } else {
- g_info("scrolling far");
- // Cannot reuse any part of the screen : far jump
-
- //not necessary for histo, because in before chunk ,it clears the area
- /* histo_rectangle_pixmap (histocontrol_flow_data->drawing->drawing_area->style->black_gc,
- TRUE,
- 0, 0,
- histocontrol_flow_data->drawing->width,//+SAFETY, // do not overlap
- -1,drawing);
-*/
- //gtk_widget_queue_draw_area (drawing->drawing_area,
- // 0,0,
- // histocontrol_flow_data->drawing->width,
- // histocontrol_flow_data->drawing->height);
-/* gtk_widget_queue_draw(drawing->drawing_area);
-
- drawing->damage_begin = 0;
- drawing->damage_end = histocontrol_flow_data->drawing->width;
-/*
- histo_drawing_data_request(histocontrol_flow_data->drawing,
- 0, 0,
- histocontrol_flow_data->drawing->width,
- histocontrol_flow_data->drawing->height);*/
- //replaced for hisogram
- /* histo_request_event(histocontrol_flow_data,drawing->damage_begin,
- drawing->damage_end- drawing->damage_begin);
- }
- }
- }
- } else {
- // Different scale (zoom)
- g_info("zoom");
-
- //not necessary for histo, because in before chunk ,it clears the area
- /*
- histo_rectangle_pixmap (drawing->drawing_area->style->black_gc,
- TRUE,
- 0, 0,
- histocontrol_flow_data->drawing->width+SAFETY, // do not overlap
- -1,drawing);
-*/
- //gtk_widget_queue_draw_area (drawing->drawing_area,
- // 0,0,
- // histocontrol_flow_data->drawing->width,
- // histocontrol_flow_data->drawing->height);
-/*// gtk_widget_queue_draw(drawing->drawing_area);
-
- drawing->damage_begin = 0;
- drawing->damage_end = drawing->width;
-
- //replaced for hisogram
- histo_request_event(histocontrol_flow_data,drawing->damage_begin,
- drawing->damage_end- drawing->damage_begin);
- }
-
- // Update directly when scrolling
- gdk_window_process_updates(drawing->drawing_area->window,
- TRUE);
-
- //show number of event at current time
-
- histo_drawing_update_vertical_ruler(drawing);
-*/
-#endif
-
-//disabled for histogram, always redraw whole screen.
return 0;
}
HistoControlFlowData *histocontrol_flow_data = (HistoControlFlowData*)hook_data;
histoDrawing_t *drawing =histocontrol_flow_data->drawing;
- LttvTracesetContext * tsc =
- lttvwindow_get_traceset_context(histocontrol_flow_data->tab);
-
histocontrol_flow_data->histo_main_win_filter =
(LttvFilter*)call_data;
//get_events(event_viewer_data->vadjust_c->value, event_viewer_data);
{
EventsRequest *histo_events_request = (EventsRequest*)hook_data;
LttvTracesetState *histo_tss = (LttvTracesetState*)call_data;
- HistoControlFlowData *histo_cfd = (HistoControlFlowData*)histo_events_request->viewer_data;
#if 0
/* Desactivate sort */
gtk_tree_sortable_set_sort_column_id(
{
EventsRequest *events_request = (EventsRequest*)hook_data;
HistoControlFlowData *histocontrol_flow_data = events_request->viewer_data;
- LttvTracesetState *tss = (LttvTracesetState*)call_data;
LttvTracesetContext *tsc = (LttvTracesetContext*)call_data;
LttvTracefileContext *tfc = lttv_traceset_context_get_current_tfc(tsc);
LttTime end_time;
*/
InterruptEventData *system_info(LttvPluginTab *ptab)
{
-
- LttTime end;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
InterruptEventData* event_viewer_data = g_new(InterruptEventData,1) ;
*/
static void FirstRequest(InterruptEventData *event_data )
{
- guint i, k, l, nb_trace;
-
- LttvTraceHook *hook;
-
- guint ret;
-
+ guint i, k, nb_trace;
LttvTraceState *ts;
-
GArray *hooks;
-
EventsRequest *events_request;
-
LttvTraceHook *th;
-
LttvTracesetContext *tsc = lttvwindow_get_traceset_context(event_data->tab);
-
-
+
/* Get the traceset */
LttvTraceset *traceset = tsc->ts;
static void CalculateData(LttTime time_exit, guint cpu_id,InterruptEventData *event_data)
{
- gint i, irq_id;
+ gint i;
irq_entry *element;
- LttTime duration;
GArray *FirstRequestIrqExit = event_data->FirstRequestIrqExit;
GArray *FirstRequestIrqEntry = event_data->FirstRequestIrqEntry;
for(i = FirstRequestIrqEntry->len-1; i >=0; i--)
*/
static gboolean SecondRequest(void *hook_data, void *call_data)
{
-
- guint i, k, l, nb_trace;
-
- LttvTraceHook *hook;
-
+ guint i, k, nb_trace;
guint ret;
-
LttvTraceState *ts;
-
GArray *hooks;
-
EventsRequest *events_request;
-
LttvTraceHook *th;
-
InterruptEventData *event_data = (InterruptEventData *)hook_data;
-
LttvTracesetContext *tsc = lttvwindow_get_traceset_context(event_data->tab);
-
CalculateAverageDurationForEachIrqId(event_data);
/* Get the traceset */
LttTime Xi;
LttTime exit_time;
- GArray *SecondRequestIrqExit = event_data->SecondRequestIrqExit;
GArray *SecondRequestIrqEntry = event_data->SecondRequestIrqEntry;
for(i = 0; i < SecondRequestIrqEntry->len; i++)
{
*/
static gboolean DisplayViewer(void *hook_data, void *call_data)
{
-
- guint average;
gint i;
Irq element;
- LttTime average_duration;
GtkTreeIter iter;
guint64 real_data;
guint maxIRQduration;
FrequencyHZ = FrequencyInHZ(element.TotalNumberOfInterrupts,event_data->time_window);
- if(FrequencyHZ != 0)
- {
+ if(FrequencyHZ != 0)
+ {
periodInSec = (double)1/FrequencyHZ;
periodInSec *= NANOSECONDS_PER_SECOND;
periodInNsec = (int)periodInSec;
- }
+ }
gtk_list_store_append (event_data->ListStore, &iter);
gtk_list_store_set (event_data->ListStore, &iter,
gboolean trace_header(void *hook_data, void *call_data)
{
-
- InterruptEventData *event_data = (InterruptEventData *)hook_data;
- LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttEvent *e;
- LttTime event_time;
return FALSE;
}
void interrupt_destroy_walk(gpointer data, gpointer user_data)
{
g_info("interrupt_destroy_walk");
- InterruptEventData *event_data = (InterruptEventData*) data;
interrupt_destructor((InterruptEventData*)data);
}
void insert_viewer(GtkWidget* widget, lttvwindow_viewer_constructor constructor)
{
GtkWidget * viewer_container;
- MainWindow * mw_data = get_window_data_struct(widget);
GtkWidget * notebook = lookup_widget(widget, "MNotebook");
GtkWidget * viewer;
- TimeInterval * time_interval;
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)));
LttvPluginTab *ptab;
void move_down_viewer(GtkWidget * widget, gpointer user_data)
{
- MainWindow * mw = get_window_data_struct(widget);
GtkWidget * notebook = lookup_widget(widget, "MNotebook");
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
void move_up_viewer(GtkWidget * widget, gpointer user_data)
{
- MainWindow * mw = get_window_data_struct(widget);
GtkWidget * notebook = lookup_widget(widget, "MNotebook");
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
void delete_viewer(GtkWidget * widget, gpointer user_data)
{
- MainWindow * mw = get_window_data_struct(widget);
GtkWidget * notebook = lookup_widget(widget, "MNotebook");
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
gboolean lttvwindow_process_pending_requests(Tab *tab)
{
- GtkWidget* widget;
LttvTracesetContext *tsc;
LttvTracefileContext *tfc;
GSList *list_in = NULL;
for(i = 0; i < nb_trace; i++){
trace_v = lttv_traceset_get(tab->traceset_info->traceset, i);
trace = lttv_trace(trace_v);
- name[i] = g_quark_to_string(ltt_trace_name(trace));
+ name[i] = (char *) g_quark_to_string(ltt_trace_name(trace));
}
remove_trace_name = get_remove_trace(mw_data, name, nb_trace);
TimeInterval time_span;
TimeWindow new_time_window;
LttTime current_time, time_delta;
- MainWindow * mw_data = get_window_data_struct(widget);
LttvTracesetContext *tsc;
GtkWidget * notebook = lookup_widget(widget, "MNotebook");
{
gint page_num;
GtkWidget * notebook;
- GtkWidget * page;
- MainWindow * mw_data = get_window_data_struct(widget);
notebook = lookup_widget(widget, "MNotebook");
if(notebook == NULL){
g_info("Notebook does not exist\n");
on_unload_module_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- GError *error = NULL;
MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem);
LttvLibrary *library = NULL;
{
GPtrArray *name;
guint nb,i;
- gchar *lib_name;
name = g_ptr_array_new();
nb = lttv_library_path_number();
/* ask for the library name */
GdkEventConfigure *event,
gpointer user_data)
{
- MainWindow * mw_data = get_window_data_struct((GtkWidget*)widget);
-
// MD : removed time width modification upon resizing of the main window.
// The viewers will redraw themselves completely, without time interval
// modification.
{
LttvTracesetContext *tsc =
LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
- TimeInterval time_span = tsc->time_span;
int retval;
retval= lttv_process_traceset_seek_position(tsc, pos);
GtkWidget *tlbMoveViewerUp;
GtkWidget *tlbMoveViewerDown;
GtkWidget *tlbRemoveViewer;
- GtkWidget *MToolbar2;
GtkWidget *MNotebook;
// GtkWidget *empty_notebook_page;
// GtkWidget *label1;
}
static void
-lttv_plugin_instance_init (GTypeInstance *instance, gpointer g_class)
+lttv_plugin_init (GTypeInstance *instance, gpointer g_class)
{
- LttvPlugin *self;
+ LttvPlugin *self = LTTV_PLUGIN (instance);
self->top_widget = NULL;
}
sizeof (LttvPluginClass),
NULL, /* base_init */
NULL, /* base_finalize */
- lttv_plugin_class_init, /* class_init */
+ (GClassInitFunc) lttv_plugin_class_init, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (LttvPlugin),
0, /* n_preallocs */
- NULL /* instance_init */
+ lttv_plugin_init /* instance_init */
};
type = g_type_register_static (G_TYPE_OBJECT,
"LttvPluginType",
sizeof (LttvPluginTabClass),
NULL, /* base_init */
NULL, /* base_finalize */
- lttv_plugin_tab_class_init, /* class_init */
+ (GClassInitFunc) lttv_plugin_tab_class_init, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (LttvPluginTab),
"hooks/updatecurrentposition", LTTV_POINTER, &value);
g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
- if(tmp != NULL) lttv_hooks_call(tmp, pos);
+ if (tmp != NULL) {
+ lttv_hooks_call(tmp, (void *) pos);
+ }
}
void add_toolbar_constructor(MainWindow *mw, LttvToolbarClosure *toolbar_c)
}
-/* Toolbar callbacks */
-static void property_button (GtkToolButton *toolbutton,
- gpointer user_data)
-{
- ControlFlowData *control_flow_data = (ControlFlowData*)user_data;
-
- g_printf("CFV Property button clicked\n");
-
-}
-
/*****************************************************************************
* Control Flow Viewer class implementation *
*****************************************************************************/
ControlFlowData *
resourceview(LttvPluginTab *ptab)
{
- Tab *tab = ptab->tab;
- GtkWidget *tmp_toolbar_icon;
GtkWidget *process_list_widget, *drawing_widget, *drawing_area;
- //ControlFlowData* control_flow_data = g_new(ControlFlowData,1) ;
LttvPluginCFV *plugin_cfv = g_object_new(LTTV_TYPE_PLUGIN_CFV, NULL);
- GtkTooltips *tooltips = gtk_tooltips_new();
ControlFlowData* control_flow_data = plugin_cfv->cfd;
control_flow_data->ptab = ptab;
control_flow_data->tab = ptab->tab;
{
/* find the tracehooks */
LttvTracesetContext *tsc = lttvwindow_get_traceset_context(tab);
-
LttvTraceset *traceset = tsc->ts;
-
- guint i, k, l, nb_trace;
-
LttvTraceState *ts;
-
- LttvTracefileState *tfs;
-
GArray *hooks;
-
- LttvTraceHook *hook;
-
LttvTraceHook *th;
- guint ret;
+ guint i, k;
guint first_after;
- nb_trace = lttv_traceset_number(traceset);
+ guint nb_trace = lttv_traceset_number(traceset);
// FIXME (fixed) : eventually request for more traces
for(i = 0 ; i < nb_trace ; i++) {
EventsRequest *events_request = g_new(EventsRequest, 1);
g_debug("Begin of data request");
ControlFlowData *cfd = events_request->viewer_data;
- LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
TimeWindow time_window =
lttvwindow_get_time_window(cfd->tab);
g_debug("Begin of chunk");
ControlFlowData *cfd = events_request->viewer_data;
LttvTracesetContext *tsc = &tss->parent;
- //LttTime current_time = lttv_traceset_context_get_current_tfc(tsc)->timestamp;
guint i;
LttvTraceset *traceset = tsc->ts;
guint nb_trace = lttv_traceset_number(traceset);
guint x_end;
ControlFlowData *cfd = events_request->viewer_data;
- LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
Drawing_t *drawing = cfd->drawing;
TimeWindow time_window =
int event_selected_hook(void *hook_data, void *call_data)
{
- ControlFlowData *resourceview_data = (ControlFlowData*) hook_data;
guint *event_number = (guint*) call_data;
g_debug("DEBUG : event selected by main window : %u", *event_number);
static void soft_irq_set_line_color(PropertiesLine *prop_line, LttvSoftIRQState *s)
{
- GQuark present_state;
if(s->running)
prop_line->color = drawing_colors_soft_irq[COL_SOFT_IRQ_BUSY];
else if(s->pending)
static void trap_set_line_color(PropertiesLine *prop_line, LttvTrapState *s)
{
- GQuark present_state;
if(s->running == 0)
prop_line->color = drawing_colors_trap[COL_TRAP_IDLE];
else
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
- gint target_pid_saved = tfc->target_pid;
LttTime evtime = ltt_event_time(e);
- LttvFilter *filter = resourceview_data->filter;
/* we are in a schedchange, before the state update. We must draw the
* items corresponding to the state before it changes : now is the right
guint cpu = tfs->cpu;
guint trace_num = ts->parent.index;
- /* Add process to process list (if not present) */
- guint pl_height = 0;
+ /* Add process to process list (if not present) */
HashedResourceData *hashed_process_data = NULL;
- ProcessList *process_list = resourceview_data->process_list;
hashed_process_data = resourcelist_obtain_cpu(resourceview_data, trace_num, cpu);
/* Add process to process list (if not present) */
LttvProcessState *process_in;
LttTime birth;
- guint pl_height = 0;
HashedResourceData *hashed_process_data_in = NULL;
ProcessList *process_list = resourceview_data->process_list;
/* Well, the process_out existed : we must get it in the process hash
* or add it, and draw its items.
*/
- /* Add process to process list (if not present) */
- guint pl_height = 0;
+ /* Add process to process list (if not present) */
HashedResourceData *hashed_process_data = NULL;
ProcessList *process_list = resourceview_data->process_list;
-
- LttTime birth = process->creation_time;
if(likely(process_list->current_hash_data[trace_num][cpu] != NULL)) {
hashed_process_data = process_list->current_hash_data[trace_num][cpu];
LttTime evtime = ltt_event_time(e);
- LttTrace *trace = tfc->t_context->t;
-
/* we are in a execmode, before the state update. We must draw the
* items corresponding to the state before it changes : now is the right
* time to do it.
/* Well, the process_out existed : we must get it in the process hash
* or add it, and draw its items.
*/
- /* Add process to process list (if not present) */
- guint pl_height = 0;
+ /* Add process to process list (if not present) */
HashedResourceData *hashed_process_data = NULL;
- ProcessList *process_list = resourceview_data->process_list;
hashed_process_data = resourcelist_obtain_irq(resourceview_data, trace_num, irq);
// TODO: fix this, it's ugly and slow:
LttTime evtime = ltt_event_time(e);
- LttTrace *trace = tfc->t_context->t;
-
/* we are in a execmode, before the state update. We must draw the
* items corresponding to the state before it changes : now is the right
* time to do it.
/* Well, the process_out existed : we must get it in the process hash
* or add it, and draw its items.
*/
- /* Add process to process list (if not present) */
- guint pl_height = 0;
+ /* Add process to process list (if not present) */
HashedResourceData *hashed_process_data = NULL;
- ProcessList *process_list = resourceview_data->process_list;
hashed_process_data = resourcelist_obtain_soft_irq(resourceview_data, trace_num, softirq);
LttTime evtime = ltt_event_time(e);
- LttTrace *trace = tfc->t_context->t;
-
/* we are in a execmode, before the state update. We must draw the
* items corresponding to the state before it changes : now is the right
* time to do it.
/* Well, the process_out existed : we must get it in the process hash
* or add it, and draw its items.
*/
- /* Add process to process list (if not present) */
- guint pl_height = 0;
+ /* Add process to process list (if not present) */
HashedResourceData *hashed_process_data = NULL;
- ProcessList *process_list = resourceview_data->process_list;
hashed_process_data = resourcelist_obtain_trap(resourceview_data, trace_num, trap);
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttvTracefileState *tfs = (LttvTracefileState *)call_data;
LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
LttEvent *e;
*/
/* For the pid */
- guint cpu = tfs->cpu;
guint8 major = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
guint8 minor = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 1));
- guint oper = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 2));
gint devcode_gint = MKDEV(major,minor);
guint trace_num = ts->parent.index;
/* Well, the process_out existed : we must get it in the process hash
* or add it, and draw its items.
*/
- /* Add process to process list (if not present) */
- guint pl_height = 0;
+ /* Add process to process list (if not present) */
HashedResourceData *hashed_process_data = NULL;
- ProcessList *process_list = resourceview_data->process_list;
// LttTime birth = process->creation_time;
// if(likely(process_list->current_hash_data[trace_num][cpu] != NULL)) {
/* Same scale (scrolling) */
g_info("scrolling");
LttTime *ns = &new_time_window->start_time;
- LttTime *nw = &new_time_window->time_width;
LttTime *os = &old_time_window->start_time;
- LttTime *ow = &old_time_window->time_width;
LttTime old_end = old_time_window->end_time;
LttTime new_end = new_time_window->end_time;
//if(ns<os+w<ns+w)
gint update_current_time_hook(void *hook_data, void *call_data)
{
ControlFlowData *resourceview_data = (ControlFlowData*)hook_data;
- Drawing_t *drawing = resourceview_data->drawing;
LttTime current_time = *((LttTime*)call_data);
/* Only draw for processes that are currently in the trace states */
- ProcessList *process_list = resourceview_data->process_list;
#ifdef EXTRA_CHECK
/* Should be alike when background info is ready */
if(resourceview_data->background_info_waiting==0)
{
EventsRequest *events_request = (EventsRequest*)hook_data;
LttvTracesetState *tss = (LttvTracesetState*)call_data;
- ControlFlowData *cfd = (ControlFlowData*)events_request->viewer_data;
#if 0
/* Deactivate sort */
gtk_tree_sortable_set_sort_column_id(
ControlFlowData *resourceview_data = events_request->viewer_data;
LttvTracesetState *tss = (LttvTracesetState*)call_data;
- ProcessList *process_list = resourceview_data->process_list;
LttTime end_time = events_request->end_time;
ClosureData closure_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
- LttvTracefileState *tfs = (LttvTracefileState *)call_data;
-
- LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
-
LttvTracesetState *tss = (LttvTracesetState*)tfc->t_context->ts_context;
- ProcessList *process_list = resourceview_data->process_list;
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
sizeof (LttvPluginCFVClass),
NULL, /* base_init */
NULL, /* base_finalize */
- lttv_plugin_cfv_class_init, /* class_init */
+ (GClassInitFunc) lttv_plugin_cfv_class_init, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (LttvPluginCFV),
(ControlFlowData*)g_object_get_data(
G_OBJECT(widget),
"resourceview_data");
- Drawing_t *drawing = control_flow_data->drawing;
- unsigned int cell_height =
- get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
+ unsigned int cell_height =
+ get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
switch(event->direction) {
case GDK_SCROLL_UP:
default:
g_error("should only scroll up and down.");
}
- return TRUE;
+ return TRUE;
}
void expand_event(GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *arg2, gpointer user_data)
G_OBJECT(treeview),
"resourceview_data");
ProcessList *process_list = (ProcessList *) user_data;
- ResourceUnique *rup;
HashedResourceData *hrd;
gboolean result;
G_OBJECT(treeview),
"resourceview_data");
ProcessList *process_list = (ProcessList *) user_data;
- ResourceUnique *rup;
HashedResourceData *hrd;
gboolean result;
{
StatisticViewerData *svd = (StatisticViewerData *)hook_data;
Tab *tab = svd->tab;
- LttvTrace *trace = (LttvTrace*)call_data;
svd->background_info_waiting--;
int i, nb;
LttvTraceset *ts;
LttvTraceStats *tcs;
- LttSystemDescription *desc;
LttvTracesetStats * tscs = lttvwindow_get_traceset_stats(tab);
gchar * str, trace_str[PATH_LENGTH];
GtkTreePath * path;
start_time.tv_sec,
start_time.tv_nsec);
#endif //0
- sprintf(trace_str, g_quark_to_string(ltt_trace_name(tcs->parent.parent.t)));
+ sprintf(trace_str, "%s", g_quark_to_string(ltt_trace_name(tcs->parent.parent.t)));
gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter,NAME_COLUMN,trace_str,-1);
path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
Tab *tab = ptab->tab;
g_debug("filter::gui_control()");
- unsigned i;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
-
ControlData* tcd = g_new(ControlData,1);
tcd->tab = tab;
void
gui_control_destructor(ControlData *tcd)
{
- Tab *tab = tcd->tab;
-
/* May already been done by GTK window closing */
if(GTK_IS_WIDGET(guicontrol_get_widget(tcd))){
g_info("widget still exists");
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
- msg);
+ "%s", msg);
gtk_dialog_run(GTK_DIALOG(dialogue));
gtk_widget_destroy(dialogue);
}
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
- msg);
+ "%s", msg);
gtk_dialog_run(GTK_DIALOG(dialogue));
gtk_widget_destroy(dialogue);
}
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
- msg);
+ "%s", msg);
gtk_dialog_run(GTK_DIALOG(dialogue));
gtk_widget_destroy(dialogue);
}
const gchar *lttctl_path =
gtk_entry_get_text(GTK_ENTRY(tcd->lttctl_path_entry));
- gchar *trace_dir = gtk_entry_get_text(GTK_ENTRY(tcd->trace_dir_entry));
+ const gchar *trace_dir = gtk_entry_get_text(GTK_ENTRY(tcd->trace_dir_entry));
GSList * trace_list = NULL;
- trace_list = g_slist_append(trace_list, trace_dir);
+ trace_list = g_slist_append(trace_list, (gpointer) trace_dir);
/* Setup arguments to su */
/* child */
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
- msg);
+ "%s", msg);
gtk_dialog_run(GTK_DIALOG(dialogue));
gtk_widget_destroy(dialogue);
return;
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
- msg);
+ "%s", msg);
gtk_dialog_run(GTK_DIALOG(dialogue));
gtk_widget_destroy(dialogue);
}
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
- msg);
+ "%s", msg);
gtk_dialog_run(GTK_DIALOG(dialogue));
gtk_widget_destroy(dialogue);
}
GtkWidget *
h_guicontrol(LttvPlugin *plugin)
{
- LttvPluginTab *ptab = LTTV_PLUGIN_TAB(plugin);
- ControlData* f = gui_control(ptab);
-
return NULL;
}