initial port of the mainwindow
authorFrancis Deslauriers <francis.deslauriers@polymtl.ca>
Thu, 7 Jun 2012 19:47:14 +0000 (15:47 -0400)
committerYannick Brosseau <yannick.brosseau@gmail.com>
Mon, 11 Jun 2012 21:34:34 +0000 (17:34 -0400)
Signed-off-by: Francis Deslauriers <francis.deslauriers@polymtl.ca>
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
19 files changed:
configure.ac
ltt/time.h
lttv/lttv/filter.h
lttv/lttv/traceset.c
lttv/lttv/traceset.h
lttv/modules/gui/Makefile.am
lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c
lttv/modules/gui/lttvwindow/lttvwindow/callbacks.h
lttv/modules/gui/lttvwindow/lttvwindow/init_module.c
lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin_tab.c
lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c
lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h
lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c
lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h
lttv/modules/gui/lttvwindow/lttvwindow/mainwindow-private.h
lttv/modules/gui/lttvwindow/lttvwindow/support.c
lttv/modules/gui/lttvwindow/lttvwindow/timebar.c
lttv/modules/text/textDump.c
runlttv

index e1d04d0588d2e9372be3c1002420c847ef9861a5..2af9ebecf9e887dda74c320bccadbf32ba85b496 100644 (file)
@@ -37,7 +37,7 @@ AC_ARG_WITH(lttv-gui,
        [with_lttv_gui="yes"])
 #TODO ybrosseau 2012-03-13: Remove this when babeltrace port is complete
 #Force GUI disabling while we port babeltrace
-with_lttv_gui="no"
+#with_lttv_gui="no"
 
 AM_CONDITIONAL([BUILD_LTTV_GUI], [ test "x$with_lttv_gui" = "xyes" ])
 
index 14c15d1d237c1d7d184033636750a510a63e8e16..5a959d01756cc0e74048af195cd999c5db85eb24 100644 (file)
@@ -21,7 +21,7 @@
 #define LTT_TIME_H
 
 #include <glib.h>
-#include <ltt/compiler.h>
+#include <lttv/compiler.h>
 #include <math.h>
 
 typedef struct _LttTime {
index 7b60ab4072edfa7687ee1d68a2b33615b6a1fc6b..4b51025b6d51f714ee47b08acd7c71f1325edbe5 100644 (file)
@@ -350,17 +350,15 @@ gboolean lttv_filter_tree_parse(
                const LttEvent* event,
                const LttTracefile* tracefile,
                const LttTrace* trace,
-               const LttvTracefileContext* context,
                const LttvProcessState* pstate,
-               const LttvTraceContext* tc);
+               const LttvTrace* tracev);
 
 gboolean lttv_filter_tree_parse_branch(
                const LttvSimpleExpression* se,
                const LttEvent* event,
                const LttTracefile* tracefile,
                const LttTrace* trace,
-               const LttvProcessState* state,
-               const LttvTracefileContext* context);
+               const LttvProcessState* state);
 
 /*
  *  Debug functions
index b4a14384ef80ec42024ef89ee8a6dabf9a64c92a..97499b59fff20a654ffd9029a953420577977e94 100644 (file)
 #include <lttv/state.h>
 #include <lttv/hook.h>
 #include <stdio.h>
+#include <babeltrace/babeltrace.h>
 #include <babeltrace/context.h>
-#include <babeltrace/iterator.h>
+#include <babeltrace/ctf/iterator.h>
 #include <babeltrace/ctf/events.h>
 
 /* To traverse a tree recursively */
 #include <fcntl.h>
 #include <fts.h>
+/* For the use of realpath*/
+#include <limits.h>
+#include <stdlib.h>
+/* For strcpy*/
+#include <string.h>
 
 /* A trace is a sequence of events gathered in the same tracing session. The
    events may be stored in several tracefiles in the same directory. 
@@ -53,17 +59,12 @@ LttvTraceset *lttv_traceset_new(void)
        //TODO remove this when we have really mecanism
        //s->tmpState = g_new(LttvTraceState *, 1);
        //lttv_trace_state_init(s->tmpState,0);
-       begin_pos.type = BT_SEEK_BEGIN;
 
-        //s->iter = bt_ctf_iter_create(lttv_traceset_get_context(s),
-        //                                &begin_pos,
-        //                                NULL);
        s->iter = 0;
         s->event_hooks = lttv_hooks_new();
+        
        s->state_trace_handle_index =  g_ptr_array_new();
 
-
-
        return s;
 }
 
@@ -84,6 +85,30 @@ LttvTrace *lttv_trace_new(LttTrace *t)
        return new_trace;
 }
 #endif
+/*
+ * get_absolute_pathname : Return the unique pathname in the system
+ * 
+ * pathname is the relative path.
+ * 
+ * abs_pathname is being set to the absolute path.
+ * 
+ */
+void get_absolute_pathname(const gchar *pathname, gchar * abs_pathname)
+{
+  abs_pathname[0] = '\0';
+
+  if (realpath(pathname, abs_pathname) != NULL)
+    return;
+  else
+  {
+    /* error, return the original path unmodified */
+    strcpy(abs_pathname, pathname);
+    return;
+  }
+  return;
+}
+
+
 
 /*
  * lttv_trace_create : Create a trace from a path
@@ -239,7 +264,6 @@ void lttv_trace_destroy(LttvTrace *t)
        g_free(t);
 }
 
-
 void lttv_traceset_add(LttvTraceset *s, LttvTrace *t) 
 {
        t->ref_count++;
@@ -248,11 +272,14 @@ void lttv_traceset_add(LttvTraceset *s, LttvTrace *t)
 
 int lttv_traceset_add_path(LttvTraceset *ts, char *trace_path)
 {
+
        FTS *tree;
        FTSENT *node;
        char * const paths[2] = { trace_path, NULL };
        int ret = -1;
 
+       ts->filename = trace_path;
+       
        tree = fts_open(paths, FTS_NOCHDIR | FTS_LOGICAL, 0);
        if (tree == NULL) {
                g_warning("Cannot traverse \"%s\" for reading.\n",
@@ -353,12 +380,6 @@ LttvAttribute *lttv_trace_attribute(LttvTrace *t)
        return t->a;
 }
 
-#ifdef BABEL_CLEANUP
-LttTrace *lttv_trace(LttvTrace *t)
-{
-       return t->t;
-}
-#endif
 
 gint lttv_trace_get_id(LttvTrace *t)
 {
@@ -442,6 +463,68 @@ guint lttv_traceset_get_cpuid_from_event(LttvEvent *event)
                return cpu_id;
        }
 }
+/*
+ * lttv_traceset_get_timestamp_begin : returns the  minimum timestamp of 
+ * all the traces in the traceset.
+ * 
+ */
+
+guint64 lttv_traceset_get_timestamp_begin(LttvTraceset *traceset)
+{
+  struct bt_context *bt_ctx;
+  bt_ctx = lttv_traceset_get_context(traceset);
+  guint64 timestamp_min = G_MAXUINT64, timestamp_cur = 0;
+  int i;
+  int trace_count;
+  LttvTrace *currentTrace;
+  trace_count = traceset->traces->len;
+  if(trace_count == 0) 
+    timestamp_min = 0;
+  else{
+    timestamp_min = G_MAXUINT64;
+    
+    for(i = 0; i < trace_count;i++)
+    {
+      currentTrace = g_ptr_array_index(traceset->traces,i);
+      timestamp_cur = bt_trace_handle_get_timestamp_begin(bt_ctx, currentTrace->id);
+      if(timestamp_cur < timestamp_min)
+       timestamp_min = timestamp_cur;
+    }
+  }
+  return timestamp_min;
+}
+
+/*
+ * lttv_traceset_get_timestamp_end: returns the maximum timestamp of
+ * all the traces in the traceset.
+ * 
+ */
+guint64 lttv_traceset_get_timestamp_end(LttvTraceset *traceset)
+{
+  struct bt_context *bt_ctx;
+  bt_ctx = lttv_traceset_get_context(traceset);
+  guint64 timestamp_max, timestamp_cur = 0;
+  int i;
+  int trace_count;
+  LttvTrace *currentTrace;
+  trace_count = traceset->traces->len;
+  
+  if(trace_count == 0)
+    timestamp_max = 1;
+  else
+  {
+    timestamp_max = 0;
+    for(i =0; i < trace_count;i++)
+    {
+      currentTrace = g_ptr_array_index(traceset->traces,i);
+      timestamp_cur = bt_trace_handle_get_timestamp_end(bt_ctx, currentTrace->id);
+      if(timestamp_cur > timestamp_max)
+       timestamp_max = timestamp_cur;
+    }
+  }
+  return timestamp_max;
+  
+}
 
 const char *lttv_traceset_get_name_from_event(LttvEvent *event)
 {
index 65be5efe3507e92179949af504ead3ec0b46aa9f..6af2e39cbb7eba0a26a89b59e7ce47989f892d34 100644 (file)
@@ -69,6 +69,8 @@ char * lttv_traceset_name(LttvTraceset * s);
 LttvTrace *lttv_trace_new(LttTrace *t);
 #endif
 
+void get_absolute_pathname(const gchar *pathname, gchar * abs_pathname);
+
 LttvTraceset *lttv_traceset_copy(LttvTraceset *s_orig);
 
 LttvTraceset *lttv_traceset_load(const gchar *filename);
@@ -87,6 +89,7 @@ void lttv_traceset_add(LttvTraceset *s, LttvTrace *t);
 /*
  * lttv_trace_create : Add all traces recursively to a traceset from a path
  *
+ * 
  * ts is the traceset in which will be contained the traces
  *
  * trace_path is the path where to find a set of trace.
@@ -106,11 +109,6 @@ void lttv_traceset_remove(LttvTraceset *s, unsigned i);
 
 LttvAttribute *lttv_traceset_attribute(LttvTraceset *s);
 
-
-#ifdef BABEL_CLEANUP
-LttTrace *lttv_trace(LttvTrace *t);
-#endif
-
 /* Take a position snapshot */
 LttvTracesetPosition *lttv_traceset_create_position(LttvTraceset *traceset);
 
@@ -120,6 +118,10 @@ void lttv_traceset_destroy_position(LttvTracesetPosition *traceset_pos);
 void lttv_traceset_seek_to_position(LttvTracesetPosition *traceset_pos);
 
 guint lttv_traceset_get_cpuid_from_event(LttvEvent *event);
+/* Returns the minimum timestamp of the traces in the traceset */
+guint64 lttv_traceset_get_timestamp_begin(LttvTraceset *traceset);
+/* Returns the maximum timestamp of the traces in the traceset */
+guint64 lttv_traceset_get_timestamp_end(LttvTraceset *traceset);
 
 const char *lttv_traceset_get_name_from_event(LttvEvent *event);
 
index 2c0355a45fc71d23a9e1bbce4eac3c62a4979861..bf4c25e247477357aeb5862618b1bd0beae2a590 100644 (file)
@@ -6,8 +6,8 @@
 
 # WARNING : subdirs order is important : mainWin depends on API
 
-SUBDIRS = lttvwindow controlflow detailedevents statistics filter tracecontrol histogram interrupts resourceview
-
+SUBDIRS = lttvwindow 
+# controlflow detailedevents statistics filter tracecontrol histogram interrupts resourceview
 # TODO: PORT for 0.10
 #diskperformance tutorial
 
index e00a724458900297258677e309575a8fc8592d0f..832923c9ae9333dedc60ef0bbcb6de9ec13c3fb8 100644 (file)
 #include <lttv/lttv.h>
 #include <lttv/module.h>
 #include <lttv/iattribute.h>
+#include <lttv/traceset.h>
+#ifdef BABEL_CLEANUP
 #include <lttv/stats.h>
-#include <lttv/filter.h>
 #include <lttv/sync/sync_chain_lttv.h>
+#endif /* BABEL_CLEANUP */
+#include <lttv/filter.h>
 #include <lttvwindow/mainwindow.h>
 #include <lttvwindow/mainwindow-private.h>
 #include <lttvwindow/menu.h>
 #include <lttvwindow/lttvwindowtraces.h>
 #include <lttvwindow/lttv_plugin_tab.h>
 
+#include <babeltrace/babeltrace.h>
+#include <babeltrace/ctf/events.h>
+#include <babeltrace/ctf/iterator.h>
+
 static LttTime lttvwindow_default_time_width = { 1, 0 };
 #define CLIP_BUF 256 // size of clipboard buffer
 
@@ -218,13 +225,13 @@ void insert_viewer(GtkWidget* widget, lttvwindow_viewer_constructor constructor)
 
 int SetTraceset(Tab * tab, LttvTraceset *traceset)
 {
+  
   guint i;
   TimeInterval time_span;
   TimeWindow new_time_window;
   LttTime new_current_time;
-  LttvTracesetContext *tsc =
-    LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
 
+#ifdef BABEL_CLEANUP
   // Perform time synchronization on the traces
   if (syncTraceset(tsc))
   {
@@ -274,11 +281,17 @@ int SetTraceset(Tab * tab, LttvTraceset *traceset)
 
     tsc = LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
   }
+#endif /*BABEL_CLEANUP*/
 
-  time_span = tsc->time_span;
-  new_time_window = tab->time_window;
-  new_current_time = tab->current_time;
 
+  time_span.start_time =ltt_time_from_uint64( lttv_traceset_get_timestamp_begin(traceset));
+  time_span.end_time = ltt_time_from_uint64(lttv_traceset_get_timestamp_end(traceset));
+  
+  tab->traceset_info->traceset = traceset;
+  
+  new_time_window = tab->time_window;
+  new_current_time = tab->current_time;        
   /* Set the tab's time window and current time if
    * out of bounds */
   if(ltt_time_compare(tab->time_window.start_time, time_span.start_time) < 0
@@ -311,6 +324,7 @@ int SetTraceset(Tab * tab, LttvTraceset *traceset)
   current_time_change_manager(tab, new_current_time);
 
   return retval;
+  
 }
 
 /**
@@ -698,6 +712,7 @@ void open_traceset(GtkWidget * widget, gpointer user_data)
 
 gboolean lttvwindow_process_pending_requests(Tab *tab)
 {
+  #ifdef BABEL_CLEANUP
   LttvTracesetContext *tsc;
   LttvTracefileContext *tfc;
   GSList *list_in = NULL;
@@ -1476,6 +1491,8 @@ gboolean lttvwindow_process_pending_requests(Tab *tab)
                   NULL);
   return FALSE;
   */
+  
+  #endif /* BABEL_CLEANUP */
 }
 
 #undef list_out
@@ -1486,7 +1503,7 @@ static gboolean
 live_trace_update_handler(Tab *tab)
 {  
        unsigned int updated_count;
-
+#ifdef BABEL_CLEANUP
        LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
        TimeInterval initial_time_span = tsc->time_span;
        TimeInterval updated_time_span;
@@ -1521,10 +1538,12 @@ live_trace_update_handler(Tab *tab)
 
        /* Timer will be recalled as long as there is files to update */
        return (updated_count > 0);
+#endif /* BABEL_CLEANUP */
 }
 
 static void lttvwindow_add_trace(Tab *tab, LttvTrace *trace_v)
 {
+  #ifdef BABEL_CLEANUP
   LttvTraceset *traceset = tab->traceset_info->traceset;
   guint i;
   guint num_traces = lttv_traceset_number(traceset);
@@ -1585,7 +1604,7 @@ static void lttvwindow_add_trace(Tab *tab, LttvTrace *trace_v)
                                 (GSourceFunc) live_trace_update_handler,
                                 tab);
   }
-
+#endif /* BABEL_CLEANUP */
 }
 
 /* add_trace adds a trace into the current traceset. It first displays a 
@@ -1595,6 +1614,7 @@ static void lttvwindow_add_trace(Tab *tab, LttvTrace *trace_v)
 
 void add_trace(GtkWidget * widget, gpointer user_data)
 {
+#ifdef BABEL_CLEANUP
   LttTrace *trace;
   LttvTrace * trace_v;
   LttvTraceset * traceset;
@@ -1699,6 +1719,8 @@ void add_trace(GtkWidget * widget, gpointer user_data)
            break;
   }
   gtk_widget_destroy((GtkWidget*)file_chooser);
+  
+#endif /* BABEL_CLEANUP */
 
 }
 
@@ -1716,6 +1738,7 @@ void add_trace(GtkWidget * widget, gpointer user_data)
 
 void remove_trace(GtkWidget *widget, gpointer user_data)
 {
+  #ifdef BABEL_CLEANUP
   LttTrace *trace;
   LttvTrace * trace_v;
   LttvTraceset * traceset;
@@ -1804,6 +1827,7 @@ void remove_trace(GtkWidget *widget, gpointer user_data)
     SetTraceset(tab, (gpointer)traceset);
   }
   g_free(name);
+#endif /* BABEL_CLEANUP */ 
 }
 
 #if 0
@@ -2056,6 +2080,7 @@ void save_as(GtkWidget * widget, gpointer user_data)
 
 void zoom(GtkWidget * widget, double size)
 {
+  #ifdef BABEL_CLEANUP
   TimeInterval time_span;
   TimeWindow new_time_window;
   LttTime    current_time, time_delta;
@@ -2139,6 +2164,8 @@ void zoom(GtkWidget * widget, double size)
  } else {
    time_change_manager(tab, new_time_window);
   }
+  
+#endif /* BABEL_CLEANUP */
 }
 
 void zoom_in(GtkWidget * widget, gpointer user_data)
@@ -3234,14 +3261,19 @@ on_MNotebook_switch_page               (GtkNotebook     *notebook,
 
 void time_change_manager               (Tab *tab,
                                         TimeWindow new_time_window)
-{
+{ 
+  
   /* Only one source of time change */
   if(tab->time_manager_lock == TRUE) return;
 
   tab->time_manager_lock = TRUE;
+  TimeInterval time_span;
+  
+  LttvTraceset *ts = tab->traceset_info->traceset;
+  time_span.start_time =ltt_time_from_uint64( lttv_traceset_get_timestamp_begin(ts));
+  time_span.end_time = ltt_time_from_uint64(lttv_traceset_get_timestamp_end(ts));
+  
 
-  LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
-  TimeInterval time_span = tsc->time_span;
   LttTime start_time = new_time_window.start_time;
   LttTime end_time = new_time_window.end_time;
 
@@ -3249,7 +3281,8 @@ void time_change_manager               (Tab *tab,
   
   /* Set scrollbar */
   GtkAdjustment *adjustment = gtk_range_get_adjustment(GTK_RANGE(tab->scrollbar));
-  LttTime upper = ltt_time_sub(time_span.end_time, time_span.start_time);
+  LttTime upper = ltt_time_sub(time_span.end_time, time_span.start_time); 
+
 #if 0  
   gtk_range_set_increments(GTK_RANGE(tab->scrollbar),
                ltt_time_to_double(new_time_window.time_width)
@@ -3304,6 +3337,8 @@ void time_change_manager               (Tab *tab,
   set_time_window(tab, &new_time_window);
 
   tab->time_manager_lock = FALSE;
+  
+
 }
 
 
@@ -3326,8 +3361,9 @@ void current_time_change_manager       (Tab *tab,
 }
 
 void current_position_change_manager(Tab *tab,
-                                     LttvTracesetContextPosition *pos)
+                                     LttvTracesetPosition *pos)
 {
+    #ifdef BABEL_CLEANUP
   LttvTracesetContext *tsc =
     LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
   int retval;
@@ -3341,11 +3377,13 @@ void current_position_change_manager(Tab *tab,
   current_time_change_manager(tab, new_time);
   
   set_current_position(tab, pos);
+    #endif /* BABEL_CLEANUP */
 }
 
 static void on_timebar_starttime_changed(Timebar *timebar,
                                gpointer user_data)
 {
+  #ifdef BABEL_CLEANUP
        Tab *tab = (Tab *)user_data;
        LttvTracesetContext * tsc =
                LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
@@ -3377,12 +3415,13 @@ static void on_timebar_starttime_changed(Timebar *timebar,
 
        /* Notify the time_manager */
        time_change_manager(tab, new_time_window);
-
+#endif /* BABEL_CLEANUP */
 }
 
 static void on_timebar_endtime_changed(Timebar *timebar,
                                gpointer user_data)
 {
+    #ifdef BABEL_CLEANUP
        Tab *tab = (Tab *)user_data;
        LttvTracesetContext * tsc = 
                LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
@@ -3414,6 +3453,7 @@ static void on_timebar_endtime_changed(Timebar *timebar,
 
        /* Notify the time_manager */
        time_change_manager(tab, new_time_window);  
+         #endif /* BABEL_CLEANUP*/
 }
 static void on_timebar_currenttime_changed(Timebar *timebar,
                                gpointer user_data)
@@ -3428,6 +3468,7 @@ static void on_timebar_currenttime_changed(Timebar *timebar,
 void scroll_value_changed_cb(GtkWidget *scrollbar,
                              gpointer user_data)
 {
+    #ifdef BABEL_CLEANUP
   Tab *tab = (Tab *)user_data;
   TimeWindow new_time_window;
   LttTime time;
@@ -3485,6 +3526,7 @@ void scroll_value_changed_cb(GtkWidget *scrollbar,
   /* call viewer hooks for new time window */
   set_time_window(tab, &time_window);
 #endif //0
+#endif /* BABEL_CLEANUP */
 }
 
 
@@ -3855,6 +3897,7 @@ MainWindow *construct_main_window(MainWindow * parent)
 
 void tab_destructor(LttvPluginTab * ptab)
 {
+#ifdef BABEL_CLEANUP
   int i, nb, ref_count;
   LttvTrace * trace;
   Tab *tab = ptab->tab;
@@ -3893,6 +3936,7 @@ void tab_destructor(LttvPluginTab * ptab)
   g_free(tab->traceset_info);
   //g_free(tab);
   g_object_unref(ptab);
+#endif /* BABEL_CLEANUP */
 }
 
 
@@ -3902,6 +3946,7 @@ void tab_destructor(LttvPluginTab * ptab)
 void init_tab(Tab *tab, MainWindow * mw, Tab *copy_tab, 
                  GtkNotebook * notebook, char * label)
 {
+
   GList * list;
   //Tab * tab;
   //LttvFilter *filter = NULL;
@@ -3919,9 +3964,13 @@ void init_tab(Tab *tab, MainWindow * mw, Tab *copy_tab,
     /* Copy the previous tab's filter */
     /* We can clone the filter, as we copy the trace set also */
     /* The filter must always be in sync with the trace set */
+   
+#ifdef BABEL_CLEANUP
     tab->filter = lttv_filter_clone(copy_tab->filter);
+#endif /* BABEL_CLEANUP */
   } else {
     tab->traceset_info->traceset = lttv_traceset_new();
+
     tab->filter = NULL;
   }
 #ifdef DEBUG
@@ -3931,21 +3980,17 @@ void init_tab(Tab *tab, MainWindow * mw, Tab *copy_tab,
       0, 4);
   fflush(stdout);
 #endif //DEBUG
-
+// 
   tab->time_manager_lock = FALSE;
   tab->current_time_manager_lock = FALSE;
-
+#ifdef BABEL_CLEANUP
   //FIXME copy not implemented in lower level
   tab->traceset_info->traceset_context =
     g_object_new(LTTV_TRACESET_STATS_TYPE, NULL);
-  g_assert(tab->traceset_info->traceset_context != NULL);
-  lttv_context_init(
-           LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context),
-                                 tab->traceset_info->traceset);
   //add state update hooks
   lttv_state_add_event_hooks(
        (LttvTracesetState*)tab->traceset_info->traceset_context);
-  
+#endif //BABEL_CLEANUP
   //determine the current_time and time_window of the tab
 #if 0
   if(copy_tab != NULL){
@@ -4110,7 +4155,7 @@ void init_tab(Tab *tab, MainWindow * mw, Tab *copy_tab,
     lttvwindow_report_time_window(tab, time_window);
     lttvwindow_report_current_time(tab, ltt_time_zero);
   }
+
   LttvTraceset *traceset = tab->traceset_info->traceset;
   SetTraceset(tab, traceset);
 }
@@ -4128,8 +4173,9 @@ gboolean execute_events_requests(Tab *tab)
 }
 
 
-__EXPORT void create_main_window_with_trace_list(GSList *traces, gboolean is_live)
+__EXPORT void create_main_window_with_trace_list(GSList *traces)
 {
+
   GSList *iter = NULL;
 
   /* Create window */
@@ -4149,24 +4195,19 @@ __EXPORT void create_main_window_with_trace_list(GSList *traces, gboolean is_liv
     ptab = (LttvPluginTab *)g_object_get_data(G_OBJECT(page), "Tab_Plugin");
     tab = ptab->tab;
   }
-
+  
+  LttvTraceset * traceset = lttv_traceset_new();
   for(iter=traces; iter!=NULL; iter=g_slist_next(iter)) {
     gchar *path = (gchar*)iter->data;
     /* Add trace */
     gchar abs_path[PATH_MAX];
-    LttvTrace *trace_v;
-    LttTrace *trace;
 
     get_absolute_pathname(path, abs_path);
-    trace_v = lttvwindowtraces_get_trace_by_name(abs_path);
-    if(trace_v == NULL) {
-      if(is_live) {
-       trace = ltt_trace_open_live(abs_path);
-      } else {
-       trace = ltt_trace_open(abs_path);
-      }
-      if(trace == NULL) {
-        g_warning("cannot open trace %s", abs_path);
+    
+    if(lttv_traceset_add_path(traceset,abs_path) != 0 ){ /*failure*/
+    
+      g_warning("cannot open trace %s", abs_path);
 
         GtkWidget *dialogue = 
           gtk_message_dialog_new(
@@ -4178,19 +4219,10 @@ __EXPORT void create_main_window_with_trace_list(GSList *traces, gboolean is_liv
             "to select it ?");
         gtk_dialog_run(GTK_DIALOG(dialogue));
         gtk_widget_destroy(dialogue);
-      } else {
-        trace_v = lttv_trace_new(trace);
-        lttvwindowtraces_add_trace(trace_v);
-        lttvwindow_add_trace(tab, trace_v);
-      }
-    } else {
-      lttvwindow_add_trace(tab, trace_v);
     }
-  }
-  
-  LttvTraceset *traceset;
-
-  traceset = tab->traceset_info->traceset;
-  SetTraceset(tab, traceset);
+    else{
+        SetTraceset(tab, traceset);
+    }
+  } 
 }
 
index b4373b80bff3537a94b11e87eacea8c00df1e994..1bbd4fbf05a5c13a0e8673f23a8b01884d238b67 100644 (file)
@@ -27,7 +27,7 @@ MainWindow *construct_main_window(MainWindow * parent);
 void main_window_free(MainWindow * mw);
 void main_window_destructor(MainWindow * mw);
 
-void create_main_window_with_trace_list(GSList *traces, gboolean is_live);
+void create_main_window_with_trace_list(GSList *traces);
 
 void insert_viewer_wrap(GtkWidget *menuitem, gpointer user_data);
 gboolean execute_events_requests(Tab *tab);
index 5b8289570066bb12da936fdae51a7a92495ccee7..03e2581066bc4f6f9e7a3eea4f32f65694316460 100644 (file)
 #include <lttv/hook.h>
 #include <lttv/option.h>
 #include <lttv/module.h>
-#include <lttv/tracecontext.h>
+
 #include <lttv/state.h>
+#ifdef BABEL_CLEANUP
 #include <lttv/stats.h>
+#endif /* BABEL_CLEANUP */
 #include <lttvwindow/menu.h>
 #include <lttvwindow/toolbar.h>
 #include <lttvwindow/lttvwindowtraces.h>
@@ -125,7 +127,7 @@ static gboolean window_creation_hook(void *hook_data, void *call_data)
   add_pixmap_directory ("../modules/gui/main/pixmaps");
 
   /* First window, use command line trace */
-  create_main_window_with_trace_list(g_init_trace, a_live);
+  create_main_window_with_trace_list(g_init_trace);
 
   gtk_main ();
 
@@ -187,7 +189,7 @@ static void init() {
   g_assert((main_hooks = *(value.v_pointer)) != NULL);
 
   lttv_hooks_add(main_hooks, window_creation_hook, NULL, LTTV_PRIO_DEFAULT);
-
+#ifdef BABEL_CLEANUP
   {
     /* Register state calculator */
     LttvHooks *hook_adder = lttv_hooks_new();
@@ -227,6 +229,7 @@ static void init() {
         after_request, NULL, NULL,
         hook_adder, hook_remover);
   }
+#endif /* BABEL_CLEANUP */
 }
 
 void
@@ -267,4 +270,4 @@ static void destroy() {
 
 LTTV_MODULE("lttvwindow", "Viewer main window", \
     "Viewer with multiple windows, tabs and panes for graphical modules", \
-           init, destroy, "stats", "option", "sync")
+           init, destroy, "option","state")
index 70591766ef6adca6d4ef1fc7ed02f5191639d579..519e5d2ffa41656699412c28690f48fd8dc6159f 100644 (file)
@@ -32,12 +32,13 @@ static void tab_update_filter(LttvPlugin *parent, LttvFilter *filter)
 {
   LttvPluginTab *self = LTTV_PLUGIN_TAB(parent);
   g_message("In tab update filter.");
+  #ifdef BABEL_CLEANUP
   lttv_filter_destroy(self->tab->filter);
+  #endif /* BABEL_CLEANUP */ 
   self->tab->filter = filter;
   lttvwindow_report_filter(self->tab, filter);
 }
 
-
 static void
 lttv_plugin_tab_class_init (LttvPluginTabClass *klass)
 {
index 56a847e6159e0739229b625b61b1ae0eb3c57a78..60c18157cecbd99d106298c9628ac8f52e54421e 100644 (file)
@@ -35,8 +35,9 @@
 #include <ltt/ltt.h>
 #include <lttv/lttv.h>
 #include <lttv/state.h>
+#ifdef BABEL_CLEANUP
 #include <lttv/stats.h>
-#include <lttv/tracecontext.h>
+#endif /* BABEL_CLEANUP */
 #include <lttvwindow/mainwindow.h>   
 #include <lttvwindow/mainwindow-private.h>   
 #include <lttvwindow/lttvwindow.h>
@@ -115,8 +116,10 @@ void set_current_time(Tab *tab, const LttTime *current_time)
  * This is called whenever the current time value changes.
  */
 
-void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos)
+void set_current_position(Tab *tab, const LttvTracesetPosition *pos)
 {
+ #ifdef BABEL_CLEANUP
+
   LttvAttributeValue value;
   LttvHooks * tmp;
   gboolean retval;
@@ -130,6 +133,7 @@ void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos)
   if (tmp != NULL) {
     lttv_hooks_call(tmp, (void *) pos);
   }
+#endif /*BABEL_CLEANUP*/
 }
 
 void add_toolbar_constructor(MainWindow *mw, LttvToolbarClosure *toolbar_c)
@@ -1008,7 +1012,7 @@ __EXPORT void lttvwindow_report_current_time(Tab *tab,
  */
 
 __EXPORT void lttvwindow_report_current_position(Tab *tab,
-                                        LttvTracesetContextPosition *pos)
+                                        LttvTracesetPosition *pos)
 {
   current_position_change_manager(tab, pos);
 }
@@ -1214,7 +1218,7 @@ void lttvwindow_report_filter(Tab *tab, LttvFilter *filter)
   lttv_hooks_call(tmp, filter);
 }
 
-
+#ifdef BABEL_CLEANUP
 
 /**
  * Function to get the stats of the traceset 
@@ -1225,15 +1229,11 @@ __EXPORT LttvTracesetStats* lttvwindow_get_traceset_stats(Tab *tab)
 {
   return tab->traceset_info->traceset_context;
 }
-
-__EXPORT LttvTracesetContext* lttvwindow_get_traceset_context(Tab *tab)
-{
-  return (LttvTracesetContext*)tab->traceset_info->traceset_context;
-}
-
+#endif /*BABEL_CLEANUP*/
 
 void events_request_free(EventsRequest *events_request)
 {
+  #ifdef BABEL_CLEANUP
   if(events_request == NULL) return;
 
   if(events_request->start_position != NULL)
@@ -1267,10 +1267,10 @@ void events_request_free(EventsRequest *events_request)
        lttv_hooks_destroy(events_request->after_request);
 
   g_free(events_request);
+  #endif /*BABEL_CLEANUP*/
 }
 
 
-
 __EXPORT GtkWidget *main_window_get_widget(Tab *tab)
 {
   return tab->mw->mwindow;
index 42a8ba3083087756470b5c3a12a2bf8909f0f667..03ff9cc04e5daf1a86c64fe963ca7d171910b498 100644 (file)
@@ -255,9 +255,11 @@ FIXME : explain other important events
 #include <ltt/ltt.h>
 #include <ltt/time.h>
 #include <lttv/hook.h>
-#include <lttv/tracecontext.h>
+#ifdef BABEL_CLEANUP
 #include <lttv/stats.h>
+
 #include <lttv/filter.h>
+#endif /* BABEL_CLEANUP */
 #include <lttvwindow/mainwindow.h>
 #include <lttvwindow/lttv_plugin.h>
 
@@ -663,7 +665,7 @@ void lttvwindow_report_current_time(Tab *tab,
  */
 
 void lttvwindow_report_current_position(Tab *tab,
-                                        LttvTracesetContextPosition *pos);
+                                        LttvTracesetPosition *pos);
 
 /**
  * Function to set the position of the hpane's dividor (viewer).
@@ -684,18 +686,17 @@ typedef struct _EventsRequest {
   gpointer                     viewer_data;     /* Unset : NULL             */
   gboolean                     servicing;       /* service in progress: TRUE*/ 
   LttTime                      start_time;      /* Unset : ltt_time_infinite*/
-  LttvTracesetContextPosition *start_position;  /* Unset : NULL             */
+  LttvTracesetPosition *start_position;  /* Unset : NULL             */
   gboolean                     stop_flag;       /* Continue:TRUE Stop:FALSE */
   LttTime                      end_time;        /* Unset : ltt_time_infinite*/
   guint                        num_events;      /* Unset : G_MAXUINT        */
-  LttvTracesetContextPosition *end_position;    /* Unset : NULL             */
+  LttvTracesetPosition *end_position;    /* Unset : NULL             */
   gint                         trace;           /* unset : -1               */
   GArray                      *hooks;           /* Unset : NULL             */
   LttvHooks                   *before_chunk_traceset; /* Unset : NULL       */
   LttvHooks                   *before_chunk_trace;    /* Unset : NULL       */
   LttvHooks                   *before_chunk_tracefile;/* Unset : NULL       */
   LttvHooks                   *event;           /* Unset : NULL             */
-  LttvHooksByIdChannelArray   *event_by_id_channel;/* Unset : NULL          */
   LttvHooks                   *after_chunk_tracefile; /* Unset : NULL       */
   LttvHooks                   *after_chunk_trace;     /* Unset : NULL       */
   LttvHooks                   *after_chunk_traceset;  /* Unset : NULL       */
@@ -806,7 +807,7 @@ LttTime lttvwindow_get_current_time(Tab *tab);
 
 void lttvwindow_report_filter(Tab *tab, LttvFilter *filter);
 
-
+#ifdef BABEL_CLEANUP
 
 /**
  * Function to get the stats of the traceset 
@@ -817,16 +818,7 @@ void lttvwindow_report_filter(Tab *tab, LttvFilter *filter);
  */
 
 LttvTracesetStats* lttvwindow_get_traceset_stats(Tab *tab);
-
-/**
- * Function to get the context of the traceset 
- * It must be non const so the viewer can add and remove hooks from it.
- * @param tab the tab the viewer belongs to.
- * @return Context of the current tab.
- */
-
-
-LttvTracesetContext* lttvwindow_get_traceset_context(Tab *tab);
+#endif /*BABEL_CLEANUP*/
 
 
 /* set_time_window 
@@ -858,7 +850,7 @@ void events_request_free(EventsRequest *events_request);
 
 GtkWidget *main_window_get_widget(Tab *tab);
 
-void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos);
+void set_current_position(Tab *tab, const LttvTracesetPosition *pos);
 
 
 /**
@@ -881,6 +873,6 @@ static inline void lttvwindow_events_request_enable(void)
 
 
 void current_position_change_manager(Tab *tab,
-                                     LttvTracesetContextPosition *pos);
+                                     LttvTracesetPosition *pos);
 
 #endif //LTTVWINDOW_H
index 05ab4b436e758444496cb3b49a2401fb5b4203f7..80efe432354a9cbfe8729b6e854f148d7a2eef90 100644 (file)
@@ -36,7 +36,6 @@
 #include <lttv/lttv.h>
 #include <lttv/traceset.h>
 #include <lttv/attribute.h>
-#include <lttv/tracecontext.h>
 #include <lttvwindow/lttvwindowtraces.h>
 #include <lttvwindow/lttvwindow.h> // for CHUNK_NUM_EVENTS
 #include <lttvwindow/mainwindow-private.h> /* for main window structure */
@@ -56,7 +55,7 @@ typedef struct _BackgroundNotify {
   gpointer                     owner;
   LttvTrace                   *trace; /* trace */
   LttTime                      notify_time;
-  LttvTracesetContextPosition *notify_position;
+  LttvTracesetPosition                *notify_position;
   LttvHooks                   *notify; /* Hook to call when the notify is
                                           passed, or at the end of trace */
 } BackgroundNotify;
@@ -75,6 +74,7 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace);
 
 __EXPORT LttvTrace *lttvwindowtraces_get_trace_by_name(gchar *path)
 {
+#ifdef BABEL_CLEANUP
   guint i;
 
   for(i=0;i<lttvwindowtraces_get_number();i++) {
@@ -92,7 +92,7 @@ __EXPORT LttvTrace *lttvwindowtraces_get_trace_by_name(gchar *path)
       return trace_v;
     }
   }
-  
+#endif
   return NULL;
 }
 
@@ -141,6 +141,7 @@ __EXPORT guint lttvwindowtraces_get_number()
 
 void lttvwindowtraces_add_trace(LttvTrace *trace)
 {
+
   LttvAttribute *g_attribute = lttv_global_attributes();
   LttvAttribute *attribute;
   LttvAttributeValue value;
@@ -148,7 +149,7 @@ void lttvwindowtraces_add_trace(LttvTrace *trace)
   gchar attribute_path[PATH_MAX];
   int result;
   gboolean result_b;
-
+  #ifdef BABEL_CLEANUP
   if(stat(g_quark_to_string(ltt_trace_name(lttv_trace(trace))), &buf)) {
     g_warning("lttvwindowtraces_add_trace: Trace %s not found",
         g_quark_to_string(ltt_trace_name(lttv_trace(trace))));
@@ -196,6 +197,7 @@ void lttvwindowtraces_add_trace(LttvTrace *trace)
   *(value.v_pointer) = tss;
   
   lttv_context_init(LTTV_TRACESET_CONTEXT(tss), ts);
+#endif
 #if 0
   result_b = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
                                 LTTV_COMPUTATION_SYNC_POSITION,
@@ -252,7 +254,6 @@ void lttvwindowtraces_remove_trace(LttvTrace *trace)
 
       /* destroy traceset and tracesetcontext */
       LttvTraceset *ts;
-      LttvTracesetStats *tss;
       //LttvTracesetContextPosition *sync_position;
       
       l_attribute = lttv_trace_attribute(trace);
@@ -296,11 +297,12 @@ void lttvwindowtraces_remove_trace(LttvTrace *trace)
                                     LTTV_POINTER,
                                     &value);
       g_assert(result);
-
+#ifdef BABEL_CLEANUP
       tss = (LttvTracesetStats*)*(value.v_pointer);
       
       lttv_context_fini(LTTV_TRACESET_CONTEXT(tss));
       g_object_unref(tss);
+#endif /* BABEL_CLEANUP */
       lttv_iattribute_remove_by_name(LTTV_IATTRIBUTE(l_attribute),
                                      LTTV_COMPUTATION_TRACESET_CONTEXT);
       lttv_iattribute_remove_by_name(LTTV_IATTRIBUTE(l_attribute),
@@ -390,7 +392,7 @@ __EXPORT void lttvwindowtraces_background_request_queue
       GTK_MESSAGE_INFO, GTK_BUTTONS_OK, 
       "Background computation for %s started for trace %s", 
       module_name,
-      g_quark_to_string(ltt_trace_name(lttv_trace(trace))));
+      trace->traceset->filename);
   gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(widget));
   g_signal_connect_swapped (dialog, "response",
       G_CALLBACK (destroy_dialog),
@@ -501,9 +503,10 @@ __EXPORT void lttvwindowtraces_background_notify_queue
  (gpointer                     owner,
   LttvTrace                   *trace,
   LttTime                      notify_time,
-  const LttvTracesetContextPosition *notify_position,
+  const LttvTracesetPosition *notify_position,
   const LttvHooks                   *notify)
 {
+  #ifdef BABEL_CLEANUP
   BackgroundNotify *bg_notify;
   LttvAttribute *attribute = lttv_trace_attribute(trace);
   LttvAttributeValue value;
@@ -524,7 +527,7 @@ __EXPORT void lttvwindowtraces_background_notify_queue
                                 &value);
   g_assert(result);
 
-  LttvTracesetContext *tsc = (LttvTracesetContext*)(value.v_pointer);
+  LttvTraceset *ts = (LttvTraceset)(value.v_pointer);
 
   bg_notify = g_new(BackgroundNotify,1);
 
@@ -543,6 +546,7 @@ __EXPORT void lttvwindowtraces_background_notify_queue
   lttv_hooks_add_list(bg_notify->notify, notify);
 
   *slist = g_slist_append(*slist, bg_notify);
+#endif /* BABEL_CLEANUP*/
 }
 
 /**
@@ -560,9 +564,10 @@ __EXPORT void lttvwindowtraces_background_notify_current
  (gpointer                     owner,
   LttvTrace                   *trace,
   LttTime                      notify_time,
-  const LttvTracesetContextPosition *notify_position,
+  const LttvTracesetPosition *notify_position,
   const LttvHooks                   *notify)
 {
+  #ifdef BABEL_CLEANUP
   BackgroundNotify *bg_notify;
   LttvAttribute *attribute = lttv_trace_attribute(trace);
   LttvAttributeValue value;
@@ -602,11 +607,13 @@ __EXPORT void lttvwindowtraces_background_notify_current
   lttv_hooks_add_list(bg_notify->notify, notify);
 
   *slist = g_slist_append(*slist, bg_notify);
+  #endif /* BABEL_CLEANUP */
 }
 
 
 static void notify_request_free(BackgroundNotify *notify_req)
 {
+  #ifdef BABEL_CLEANUP
   if(notify_req == NULL) return;
 
   if(notify_req->notify_position != NULL)
@@ -614,6 +621,7 @@ static void notify_request_free(BackgroundNotify *notify_req)
   if(notify_req->notify != NULL)
     lttv_hooks_destroy(notify_req->notify);
   g_free(notify_req);
+  #endif /* BABEL_CLEANUP */
 }
 
 /**
@@ -688,9 +696,10 @@ __EXPORT void lttvwindowtraces_background_notify_remove(gpointer owner)
 /* Background processing helper functions */
 
 void lttvwindowtraces_add_computation_hooks(LttvAttributeName module_name,
-                                            LttvTracesetContext *tsc,
+                                            LttvTraceset *ts,
                                             LttvHooks *hook_adder)
 {
+  #ifdef BABEL_CLEANUP
   LttvAttribute *g_attribute = lttv_global_attributes();
   LttvAttribute *module_attribute;
   LttvAttributeType type;
@@ -717,12 +726,14 @@ void lttvwindowtraces_add_computation_hooks(LttvAttributeName module_name,
     if(hook_adder != NULL)
       lttv_hooks_add_list(hook_adder, (LttvHooks*)*(value.v_pointer));
   }
+#endif /* BABEL_CLEANUP */
 }
                                             
 void lttvwindowtraces_remove_computation_hooks(LttvAttributeName module_name,
-                                               LttvTracesetContext *tsc,
+                                               LttvTraceset *ts,
                                                LttvHooks *hook_remover)
 {
+  #ifdef BABEL_CLEANUP
   LttvAttribute *g_attribute = lttv_global_attributes();
   LttvAttribute *module_attribute;
   LttvAttributeType type;
@@ -748,11 +759,13 @@ void lttvwindowtraces_remove_computation_hooks(LttvAttributeName module_name,
     if(hook_remover != NULL)
       lttv_hooks_add_list(hook_remover, (LttvHooks*)*(value.v_pointer));
   }
+  #endif /* BABEL_CLEANUP */
 }
 
 void lttvwindowtraces_call_before_chunk(LttvAttributeName module_name,
-                                        LttvTracesetContext *tsc)
+                                        LttvTraceset *ts)
 {
+  #ifdef BABEL_CLEANUP
   LttvAttribute *g_attribute = lttv_global_attributes();
   LttvAttribute *module_attribute;
   LttvAttributeType type;
@@ -816,12 +829,13 @@ void lttvwindowtraces_call_before_chunk(LttvAttributeName module_name,
                               before_chunk_tracefile,
                               event_hook,
                               event_hook_by_id_channel);
+#endif /* BABEL_CLEANUP */
 }
 
 
 
 void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name,
-                                       LttvTracesetContext *tsc)
+                                       LttvTraceset *ts)
 {
   LttvAttribute *g_attribute = lttv_global_attributes();
   LttvAttribute *module_attribute;
@@ -831,7 +845,6 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name,
   LttvHooks *after_chunk_trace=NULL;
   LttvHooks *after_chunk_tracefile=NULL;
   LttvHooks *event_hook=NULL;
-  LttvHooksByIdChannelArray *event_hook_by_id_channel=NULL;
  
   module_attribute =
       LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(LTTV_IATTRIBUTE(g_attribute),
@@ -875,16 +888,13 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name,
   type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(module_attribute),
                                      LTTV_EVENT_HOOK_BY_ID_CHANNEL,
                                      &value);
-  if(type == LTTV_POINTER) {
-    event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer);
-  }
-  
+  #ifdef BABEL_CLEANUP
   lttv_process_traceset_end(tsc,
                             after_chunk_traceset,
                             after_chunk_trace,
                             after_chunk_tracefile,
-                            event_hook,
-                            event_hook_by_id_channel);
+                            event_hook);
+#endif /* BABEL_CLEANUP*/
 
 }
 
@@ -1014,10 +1024,8 @@ static gint find_window_widget(MainWindow *a, GtkWidget *b)
 
 gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace)
 {
-  LttvTracesetContext *tsc;
-  LttvTracesetStats *tss;
+  LttvTraceset *tsc;
   LttvTraceset *ts;
-  //LttvTracesetContextPosition *sync_position;
   LttvAttribute *attribute;
   LttvAttribute *g_attribute = lttv_global_attributes();
   GSList **list_out, **list_in, **notify_in, **notify_out;
@@ -1062,14 +1070,6 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace)
   g_assert(type == LTTV_POINTER);
   ts = (LttvTraceset*)*(value.v_pointer);
  
-  type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute),
-                                     LTTV_COMPUTATION_TRACESET_CONTEXT,
-                                     &value);
-  g_assert(type == LTTV_POINTER);
-  tsc = (LttvTracesetContext*)*(value.v_pointer);
-  tss = (LttvTracesetStats*)*(value.v_pointer);
-  g_assert(LTTV_IS_TRACESET_CONTEXT(tsc));
-  g_assert(LTTV_IS_TRACESET_STATS(tss));
 #if 0
   type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute),
                                      LTTV_COMPUTATION_SYNC_POSITION,
@@ -1077,6 +1077,7 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace)
   g_assert(type == LTTV_POINTER);
   sync_position = (LttvTracesetContextPosition*)*(value.v_pointer);
 #endif //0
+#ifdef BABEL_CLEANUP
   /* There is no events requests pending : we should never have been called! */
   g_assert(g_slist_length(*list_out) != 0 || g_slist_length(*list_in) != 0);
   /* 0.1 Lock traces */
@@ -1084,9 +1085,9 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace)
     guint iter_trace=0;
     
     for(iter_trace=0; 
-        iter_trace<lttv_traceset_number(tsc->ts);
+        iter_trace<lttv_traceset_number(ts->ts);
         iter_trace++) {
-      LttvTrace *trace_v = lttv_traceset_get(tsc->ts,iter_trace);
+      LttvTrace *trace_v = lttv_traceset_get(ts->ts,iter_trace);
 
       if(lttvwindowtraces_lock(trace_v) != 0)
         return TRUE; /* Cannot get trace lock, try later */
@@ -1487,6 +1488,7 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace)
       lttvwindowtraces_unlock(trace_v);
     }
   }
+  #endif /* BABEL_CLEANUP */
   return ret_val;
 }
 
@@ -1509,7 +1511,6 @@ void lttvwindowtraces_register_computation_hooks(LttvAttributeName module_name,
                                         LttvHooks *before_request,
                                         LttvHooks *after_request,
                                         LttvHooks *event_hook,
-                                        LttvHooksById *event_hook_by_id_channel,
                                         LttvHooks *hook_adder,
                                         LttvHooks *hook_remover)
 {
@@ -1592,13 +1593,6 @@ void lttvwindowtraces_register_computation_hooks(LttvAttributeName module_name,
   g_assert(result);
   *(value.v_pointer) = event_hook;
 
-  result = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
-                                LTTV_EVENT_HOOK_BY_ID_CHANNEL,
-                                LTTV_POINTER,
-                                &value);
-  g_assert(result);
-  *(value.v_pointer) = event_hook_by_id_channel;
-
   result = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
                                 LTTV_HOOK_ADDER,
                                 LTTV_POINTER,
@@ -1832,10 +1826,6 @@ void lttvwindowtraces_unregister_computation_hooks
                                 &value);
   g_assert(result);
 
-  LttvHooksByIdChannelArray *event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer);
-  if(event_hook_by_id_channel != NULL)
-    lttv_hooks_by_id_channel_destroy(event_hook_by_id_channel);
   result = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
                                 LTTV_HOOK_ADDER,
                                 LTTV_POINTER,
index 45ad7e228c53a68db3379e87fb0025e3d59e4c52..6d7c061badc53b653ae42623d6736155063fc3f2 100644 (file)
@@ -186,7 +186,7 @@ void lttvwindowtraces_background_notify_queue
  (gpointer                     owner,
   LttvTrace                   *trace,
   LttTime                      notify_time,
-  const LttvTracesetContextPosition *notify_position,
+  const LttvTracesetPosition *notify_position,
   const LttvHooks                   *notify);
 
 /**
@@ -204,7 +204,7 @@ void lttvwindowtraces_background_notify_current
  (gpointer                     owner,
   LttvTrace                   *trace,
   LttTime                      notify_time,
-  const LttvTracesetContextPosition *notify_position,
+  const LttvTracesetPosition *notify_position,
   const LttvHooks                   *notify);
 
 /**
@@ -263,7 +263,6 @@ void lttvwindowtraces_register_computation_hooks(LttvAttributeName module_name,
                                           LttvHooks *before_request,
                                           LttvHooks *after_request,
                                           LttvHooks *event_hook,
-                                          LttvHooksById *event_hook_by_id,
                                           LttvHooks *hook_adder,
                                           LttvHooks *hook_remover);
 /**
index 5311fa153494cbafe7448c9eadbaae67de19e8d4..3770e12aee6976ecf6f3dbc11c10d1aa6d25b6e6 100644 (file)
 #include <ltt/ltt.h>
 #include <lttv/attribute.h>
 #include <lttv/traceset.h>
-#include <lttv/tracecontext.h>
+
 #include <lttv/hook.h>
+#ifdef BABEL_CLEANUP
+#include <lttv/tracecontext.h>
 #include <lttv/stats.h>
+#endif /* BABEL_CLEANUP */
 #include <lttv/filter.h>
 //#include <lttvwindow/gtkmultivpaned.h>
 #include <lttvwindow/mainwindow.h>
@@ -34,8 +37,7 @@
 #define SCROLL_STEP_PER_PAGE 10.0
 
 struct _TracesetInfo {
-  //FIXME? TracesetContext and stats in same or different variable ?
-  LttvTracesetStats * traceset_context;
+  //FIXME? Traceset is the unique member of tracesetinfo
   LttvTraceset * traceset;
 };
 
index ce92ef053ff2ac84e72f175b8928ea34d13e8813..1374d5667df150464a64a08213d0ad51d008fc9b 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <gtk/gtk.h>
 
-#include <ltt/compiler.h>
+#include <lttv/compiler.h>
 
 #include "support.h"
 
index 9673ec669a97c551f9054f2cd2eaeebfe48f8bd3..0395b81484e765f05b3f063882c86b7505c29c18 100644 (file)
@@ -242,15 +242,9 @@ void timebar_set_minmax_time(Timebar *timebar,
                ) {
                return;
        }
-
-       if (min_time != NULL) {
-               timebar->min_time = *min_time;
-       }
-
-       if (max_time != NULL) {
-               timebar->max_time = *max_time;
-       }
-
+       /* null-checked already */
+       timebar->min_time = *min_time;
+       timebar->max_time = *max_time;
 
        if (ltt_time_compare(timebar->min_time, timebar->max_time) == 0) {
 
index a8fadb5d509c805f490258246e1bdbdaa19a8e5c..a09c8b79ecb51f8392ed631135bf949b9452225c 100644 (file)
@@ -35,6 +35,7 @@
 #include <lttv/stats.h>
 #include <lttv/filter.h>
 #endif
+// #include <lttv/traceset.h>
 #include <lttv/print.h>
 #include <ltt/ltt.h>
 #include <ltt/event.h>
diff --git a/runlttv b/runlttv
index 9dfc6bf820700a522b27f5c2b0d5e5585d666592..70e236210e4c81d6abe5a6b6f5f737cadcf33961 100755 (executable)
--- a/runlttv
+++ b/runlttv
@@ -15,15 +15,15 @@ BUILDPATH=$(dirname $0)
 RCFILE="$(dirname $0)/.runlttvrc"
 TEXTLIBS="-L ${BUILDPATH}/lttv/modules/text/.libs -m textDump"
 EVALLIBS="-L ${BUILDPATH}/lttv/modules/text/.libs -m sync_chain_batch"
-GRAPHLIBS="-L ${BUILDPATH}/lttv/modules/gui/lttvwindow/lttvwindow/.libs -m lttvwindow "\
-"-L ${BUILDPATH}/lttv/modules/gui/controlflow/.libs -m guicontrolflow "\
-"-L ${BUILDPATH}/lttv/modules/gui/detailedevents/.libs -m guievents "\
-"-L ${BUILDPATH}/lttv/modules/gui/tracecontrol/.libs -m guitracecontrol "\
-"-L ${BUILDPATH}/lttv/modules/gui/statistics/.libs -m guistatistics "\
-"-L ${BUILDPATH}/lttv/modules/gui/resourceview/.libs -m resourceview "\
-"-L ${BUILDPATH}/lttv/modules/gui/filter/.libs -m guifilter "\
-"-L ${BUILDPATH}/lttv/modules/gui/interrupts/.libs -m interrupts "\
-"-L ${BUILDPATH}/lttv/modules/gui/histogram/.libs -m guihistogram"
+GRAPHLIBS="-L ${BUILDPATH}/lttv/modules/gui/lttvwindow/lttvwindow/.libs -m lttvwindow"
+#"-L ${BUILDPATH}/lttv/modules/gui/controlflow/.libs -m guicontrolflow "\
+#"-L ${BUILDPATH}/lttv/modules/gui/detailedevents/.libs -m guievents "\
+#"-L ${BUILDPATH}/lttv/modules/gui/tracecontrol/.libs -m guitracecontrol "\
+#"-L ${BUILDPATH}/lttv/modules/gui/statistics/.libs -m guistatistics "\
+#"-L ${BUILDPATH}/lttv/modules/gui/resourceview/.libs -m resourceview "\
+#"-L ${BUILDPATH}/lttv/modules/gui/filter/.libs -m guifilter "\
+#"-L ${BUILDPATH}/lttv/modules/gui/interrupts/.libs -m interrupts "\
+#"-L ${BUILDPATH}/lttv/modules/gui/histogram/.libs -m guihistogram"
 DEFAULTMODE="gui"
 
 usage () {
This page took 0.044847 seconds and 4 git commands to generate.