X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=lttv%2Fmodules%2Ftext%2FbatchAnalysis.c;h=ca3a92ef78d960eef6d9cf3ff27634c011dcac62;hb=800dfee05db51677ab91103c993d14753184c4bd;hp=00286e2cc7066de96ad8a7cc29c94fa3e8ec79c7;hpb=8f31828398b8a4fcdb679324291132f4f0e3dce6;p=lttv.git diff --git a/lttv/modules/text/batchAnalysis.c b/lttv/modules/text/batchAnalysis.c index 00286e2c..ca3a92ef 100644 --- a/lttv/modules/text/batchAnalysis.c +++ b/lttv/modules/text/batchAnalysis.c @@ -89,6 +89,9 @@ static gboolean process_traceset(void *hook_data, void *call_data) g_info("BatchAnalysis initialize context"); lttv_context_init(tc, traceset); + + sync_traceset(tc); + lttv_state_add_event_hooks(tc); if(a_stats) lttv_stats_add_event_hooks(tscs); @@ -100,6 +103,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 +275,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")