X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttv%2Fmodules%2Ftext%2FbatchAnalysis.c;h=4b02f33250f886c17082ed4e18537355e7627b5f;hb=10341d26543c63ff318a4cf5cb163bccdc58b19d;hp=00286e2cc7066de96ad8a7cc29c94fa3e8ec79c7;hpb=8f31828398b8a4fcdb679324291132f4f0e3dce6;p=lttv.git diff --git a/lttv/modules/text/batchAnalysis.c b/lttv/modules/text/batchAnalysis.c index 00286e2c..4b02f332 100644 --- a/lttv/modules/text/batchAnalysis.c +++ b/lttv/modules/text/batchAnalysis.c @@ -34,6 +34,7 @@ #include #include #include +#include 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")