X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Ftext%2FbatchAnalysis.c;h=9cd292741bc907c4472853ac019fe0967d480dcc;hb=6da3640c5dfff6319edcb000391cb2fdfa5abe56;hp=60d1cc530ebb2a06475258eefee94b461949b2f6;hpb=8bf5499521ea2f5a097df3c8273e560653093315;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/text/batchAnalysis.c b/ltt/branches/poly/lttv/modules/text/batchAnalysis.c index 60d1cc53..9cd29274 100644 --- a/ltt/branches/poly/lttv/modules/text/batchAnalysis.c +++ b/ltt/branches/poly/lttv/modules/text/batchAnalysis.c @@ -19,6 +19,9 @@ /* This module inserts a hook in the program main loop. This hook processes all the events in the main tracefile. */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -89,7 +92,7 @@ static gboolean process_traceset(void *hook_data, void *call_data) *(value_filter.v_pointer) = lttv_filter_new(); g_debug("Filter string: %s",((GString*)*(value_expression.v_pointer))->str); - g_assert(lttv_filter_append_expression(*(value_filter.v_pointer),((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, //before_traceset, after_traceset, NULL, before_trace, after_trace, @@ -114,7 +117,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, @@ -126,6 +128,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); @@ -203,7 +207,6 @@ static void init() lttv_hooks_add(main_hooks, process_traceset, NULL, LTTV_PRIO_DEFAULT); } - static void destroy() { guint i, nb; @@ -237,7 +240,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")