X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Ftext%2FbatchAnalysis.c;h=12dea8d53bc2c0b1992651ee500f3123372b7cc8;hb=a970363f31999693ffbc0d7d6cf8a15d03677d64;hp=ebb2248f8211d4ec9bb39bba5daccc82444bdaa6;hpb=0bc23ba9a5357242cf0a72b12a3a3a393d248e94;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/text/batchAnalysis.c b/ltt/branches/poly/lttv/modules/text/batchAnalysis.c index ebb2248f..12dea8d5 100644 --- a/ltt/branches/poly/lttv/modules/text/batchAnalysis.c +++ b/ltt/branches/poly/lttv/modules/text/batchAnalysis.c @@ -23,6 +23,7 @@ #include #endif +#include #include #include #include @@ -90,8 +91,8 @@ static gboolean process_traceset(void *hook_data, void *call_data) LTTV_POINTER, &value_filter)); *(value_filter.v_pointer) = lttv_filter_new(); - g_debug("Filter string: %s",((GString*)*(value_expression.v_pointer))->str); - + //g_debug("Filter string: %s",((GString*)*(value_expression.v_pointer))->str); + lttv_filter_append_expression(*(value_filter.v_pointer),((GString*)*(value_expression.v_pointer))->str); //lttv_traceset_context_add_hooks(tc, @@ -117,7 +118,6 @@ static gboolean process_traceset(void *hook_data, void *call_data) G_MAXULONG, NULL); - g_info("BatchAnalysis destroy context"); //lttv_traceset_context_remove_hooks(tc, //before_traceset, after_traceset, NULL, before_trace, after_trace, @@ -129,6 +129,8 @@ static gboolean process_traceset(void *hook_data, void *call_data) event_hook, NULL); + g_info("BatchAnalysis destroy context"); + lttv_filter_destroy(*(value_filter.v_pointer)); lttv_state_remove_event_hooks(&tscs->parent); if(a_stats) lttv_stats_remove_event_hooks(tscs); @@ -206,7 +208,6 @@ static void init() lttv_hooks_add(main_hooks, process_traceset, NULL, LTTV_PRIO_DEFAULT); } - static void destroy() { guint i, nb; @@ -240,7 +241,6 @@ static void destroy() lttv_traceset_destroy(traceset); } - LTTV_MODULE("batchAnalysis", "Batch processing of a trace", \ "Run through a trace calling all the registered hooks", \ init, destroy, "state", "stats", "option","textFilter")