Make the synchronization module interfaces more generic
[lttv.git] / lttv / modules / text / batchAnalysis.c
index 00286e2cc7066de96ad8a7cc29c94fa3e8ec79c7..4b02f33250f886c17082ed4e18537355e7627b5f 100644 (file)
@@ -34,6 +34,7 @@
 #include <lttv/stats.h>
 #include <lttv/filter.h>
 #include <ltt/trace.h>
+#include <lttv/sync/sync_chain_lttv.h>
 
 static LttvTraceset *traceset;
 
@@ -89,6 +90,9 @@ static gboolean process_traceset(void *hook_data, void *call_data)
   g_info("BatchAnalysis initialize context");
 
   lttv_context_init(tc, traceset);
+
+  syncTraceset(tc);
+
   lttv_state_add_event_hooks(tc);
   if(a_stats) lttv_stats_add_event_hooks(tscs);
 
@@ -100,6 +104,13 @@ static gboolean process_traceset(void *hook_data, void *call_data)
     LTTV_POINTER, &value_filter);
   g_assert(retval);
 
+  /* Repeat the search for the first element, the second search might have
+   * moved the first element (by creating the second element)
+   */
+  retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+    LTTV_POINTER, &value_expression);
+  g_assert(retval);
+
   *(value_filter.v_pointer) = lttv_filter_new();
   //g_debug("Filter string: %s",((GString*)*(value_expression.v_pointer))->str);
 
@@ -265,4 +276,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","textFilter")
+    init, destroy, "state", "stats", "option","textFilter", "sync")
This page took 0.023252 seconds and 4 git commands to generate.