Changes on the overall structure of the filter
authorsiboud <siboud@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 15 Mar 2005 00:06:04 +0000 (00:06 +0000)
committersiboud <siboud@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 15 Mar 2005 00:06:04 +0000 (00:06 +0000)
- text module
  - batchAnalysis -- added construction of tree
- core filter
  - work on structure for tree parsing

git-svn-id: http://ltt.polymtl.ca/svn@887 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/filter.c
ltt/branches/poly/lttv/lttv/filter.h
ltt/branches/poly/lttv/modules/gui/filter/.deps/filter.Plo
ltt/branches/poly/lttv/modules/text/batchAnalysis.c
ltt/branches/poly/lttv/modules/text/textFilter.c

index 9669c6491b3bdab4c56e42d1a82d2b8682b8a044..8b03facfbed6e58c8b08df06fe95c329b83ec554 100644 (file)
@@ -500,6 +500,11 @@ lttv_filter_new(char *expression, LttvTraceState *tcs) {
   
 }
 
+void
+lttv_filter_destroy(lttv_filter* filter) {
+
+}
+
 /**
  *     Apply the filter to a specific trace
  *     @param filter the current filter applied
index 6c8d140419f6efce2109eaeb4b4d84be2ca3acd2..a108fa8bccb90af45e622400c93a130f73f2b066 100644 (file)
@@ -176,6 +176,8 @@ gboolean parse_simple_expression(GString* expression);
 /* Compile the filter expression into an efficient data structure */
 lttv_filter_tree *lttv_filter_new(char *expression, LttvTraceState *tfs);
 
+void lttv_filter_destroy(lttv_filter* filter);
+
 /* Check if the tracefile or event satisfies the filter. The arguments are
    declared as void * to allow these functions to be used as hooks. */
 
index a78cdee5a3101d04bc7193e324a27d77d1fa29e8..e19575647a60f3232b161e4e193184373a501694 100644 (file)
@@ -3,14 +3,14 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
   /usr/include/glib-2.0/glib/gtypes.h \
   /usr/lib/glib-2.0/include/glibconfig.h \
   /usr/include/glib-2.0/glib/gmacros.h \
-  /usr/lib/gcc-lib/i486-linux/3.3.5/include/stddef.h \
-  /usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h \
-  /usr/lib/gcc-lib/i486-linux/3.3.5/include/syslimits.h \
+  /usr/lib/gcc/i386-redhat-linux/3.4.2/include/stddef.h \
+  /usr/lib/gcc/i386-redhat-linux/3.4.2/include/limits.h \
+  /usr/lib/gcc/i386-redhat-linux/3.4.2/include/syslimits.h \
   /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \
   /usr/include/gnu/stubs.h /usr/include/bits/posix1_lim.h \
   /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
   /usr/include/bits/posix2_lim.h \
-  /usr/lib/gcc-lib/i486-linux/3.3.5/include/float.h \
+  /usr/lib/gcc/i386-redhat-linux/3.4.2/include/float.h \
   /usr/include/glib-2.0/glib/garray.h \
   /usr/include/glib-2.0/glib/gasyncqueue.h \
   /usr/include/glib-2.0/glib/gthread.h \
@@ -30,7 +30,7 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
   /usr/include/glib-2.0/glib/gstring.h \
   /usr/include/glib-2.0/glib/gunicode.h \
   /usr/include/glib-2.0/glib/gutils.h \
-  /usr/lib/gcc-lib/i486-linux/3.3.5/include/stdarg.h \
+  /usr/lib/gcc/i386-redhat-linux/3.4.2/include/stdarg.h \
   /usr/include/glib-2.0/glib/gmarkup.h \
   /usr/include/glib-2.0/glib/gmessages.h \
   /usr/include/glib-2.0/glib/gnode.h \
@@ -143,6 +143,7 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
   /usr/include/atk-1.0/atk/atknoopobjectfactory.h \
   /usr/include/atk-1.0/atk/atkobjectfactory.h \
   /usr/include/atk-1.0/atk/atkregistry.h \
+  /usr/include/atk-1.0/atk/atkobjectfactory.h \
   /usr/include/atk-1.0/atk/atkrelation.h \
   /usr/include/atk-1.0/atk/atkrelationset.h \
   /usr/include/atk-1.0/atk/atkselection.h \
@@ -269,7 +270,10 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
   /usr/include/gtk-2.0/gtk/gtktextmark.h \
   /usr/include/gtk-2.0/gtk/gtktextview.h \
   /usr/include/gtk-2.0/gtk/gtktipsquery.h \
+  /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \
   /usr/include/gtk-2.0/gtk/gtktoolbar.h \
+  /usr/include/gtk-2.0/gtk/gtktoolbutton.h \
+  /usr/include/gtk-2.0/gtk/gtktoolitem.h \
   /usr/include/gtk-2.0/gtk/gtktree.h \
   /usr/include/gtk-2.0/gtk/gtktreednd.h \
   /usr/include/gtk-2.0/gtk/gtktreeitem.h \
@@ -312,11 +316,11 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
 
 /usr/include/glib-2.0/glib/gmacros.h:
 
-/usr/lib/gcc-lib/i486-linux/3.3.5/include/stddef.h:
+/usr/lib/gcc/i386-redhat-linux/3.4.2/include/stddef.h:
 
-/usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:
+/usr/lib/gcc/i386-redhat-linux/3.4.2/include/limits.h:
 
-/usr/lib/gcc-lib/i486-linux/3.3.5/include/syslimits.h:
+/usr/lib/gcc/i386-redhat-linux/3.4.2/include/syslimits.h:
 
 /usr/include/limits.h:
 
@@ -334,7 +338,7 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
 
 /usr/include/bits/posix2_lim.h:
 
-/usr/lib/gcc-lib/i486-linux/3.3.5/include/float.h:
+/usr/lib/gcc/i386-redhat-linux/3.4.2/include/float.h:
 
 /usr/include/glib-2.0/glib/garray.h:
 
@@ -384,7 +388,7 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
 
 /usr/include/glib-2.0/glib/gutils.h:
 
-/usr/lib/gcc-lib/i486-linux/3.3.5/include/stdarg.h:
+/usr/lib/gcc/i386-redhat-linux/3.4.2/include/stdarg.h:
 
 /usr/include/glib-2.0/glib/gmarkup.h:
 
@@ -644,6 +648,8 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
 
 /usr/include/atk-1.0/atk/atkregistry.h:
 
+/usr/include/atk-1.0/atk/atkobjectfactory.h:
+
 /usr/include/atk-1.0/atk/atkrelation.h:
 
 /usr/include/atk-1.0/atk/atkrelationset.h:
@@ -914,8 +920,14 @@ filter.lo filter.o: filter.c /usr/include/glib-2.0/glib.h \
 
 /usr/include/gtk-2.0/gtk/gtktipsquery.h:
 
+/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h:
+
 /usr/include/gtk-2.0/gtk/gtktoolbar.h:
 
+/usr/include/gtk-2.0/gtk/gtktoolbutton.h:
+
+/usr/include/gtk-2.0/gtk/gtktoolitem.h:
+
 /usr/include/gtk-2.0/gtk/gtktree.h:
 
 /usr/include/gtk-2.0/gtk/gtktreednd.h:
index df17c092b87384d12fbdd88d899ee4061f793ee9..a57f0aac5211f7ed4f26d3a524af9cc837c0848c 100644 (file)
@@ -28,6 +28,7 @@
 #include <lttv/tracecontext.h>
 #include <lttv/state.h>
 #include <lttv/stats.h>
+#include <lttv/filter.h>
 #include <ltt/trace.h>
 
 static LttvTraceset *traceset;
@@ -46,6 +47,10 @@ static char *a_trace;
 
 static gboolean a_stats;
 
+static lttv_filter *a_lttv_filter;
+
+extern GString *a_filter_string;
+
 void lttv_trace_option(void *hook_data)
 { 
   LttTrace *trace;
@@ -75,6 +80,8 @@ static gboolean process_traceset(void *hook_data, void *call_data)
   lttv_state_add_event_hooks(&tscs->parent);
   if(a_stats) lttv_stats_add_event_hooks(tscs);
 
+  a_lttv_filter = lttv_filter_new(a_filter_string,(LttvTraceState*)tscs);
+  
   //lttv_traceset_context_add_hooks(tc,
   //before_traceset, after_traceset, NULL, before_trace, after_trace,
   //NULL, before_tracefile, after_tracefile, NULL, before_event, after_event);
@@ -110,6 +117,7 @@ static gboolean process_traceset(void *hook_data, void *call_data)
                             event_hook,
                             NULL);
 
+  lttv_filter_destroy(a_lttv_filter);
   lttv_state_remove_event_hooks(&tscs->parent);
   if(a_stats) lttv_stats_remove_event_hooks(tscs);
   lttv_context_fini(tc);
@@ -223,4 +231,4 @@ static void destroy()
 
 LTTV_MODULE("batchAnalysis", "Batch processing of a trace", \
     "Run through a trace calling all the registered hooks", \
-    init, destroy, "state", "stats", "option")
+    init, destroy, "state", "stats", "option","filter")
index 6013fea6ffe3fc021a6ca18d0270b3b4871f391c..83895e9263900f5adabcedd40ff6d3b20e4c8a5c 100644 (file)
@@ -53,7 +53,7 @@ static char
   *a_file_name = NULL,
   *a_string = NULL;
 
-static GString
+GString
   *a_filter_string = NULL;
 
 
@@ -100,7 +100,6 @@ void filter_analyze_file(void *hook_data) {
     line = NULL;
   }
   
-  lttv_filter_new(a_filter_string->str,NULL);
   fclose(a_file);
 }
 
@@ -181,7 +180,6 @@ static void init() {
 //     LTTV_POINTER, &value));
 //  g_assert((before_traceset = *(value.v_pointer)) != NULL);
 //  lttv_hooks_add(before_traceset, parse_filter_options, NULL, LTTV_PRIO_DEFAULT);
-
   
 }
 
This page took 0.028991 seconds and 4 git commands to generate.