X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Ftext%2FbatchAnalysis.c;h=ec68e7f1490b2deae76980673f29903c6224efd3;hb=2ea36caf80da2b86d4b565fe3cbded286c7664d7;hp=c404cdd3f0e919720a96a29a30c93f2aa191169c;hpb=3d974afbca8dcf983dfde91126d3c5df76370401;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/text/batchAnalysis.c b/ltt/branches/poly/lttv/modules/text/batchAnalysis.c index c404cdd3..ec68e7f1 100644 --- a/ltt/branches/poly/lttv/modules/text/batchAnalysis.c +++ b/ltt/branches/poly/lttv/modules/text/batchAnalysis.c @@ -28,6 +28,7 @@ #include #include #include +#include #include static LttvTraceset *traceset; @@ -46,6 +47,10 @@ static char *a_trace; static gboolean a_stats; +static LttvFilter *a_lttv_filter; + +extern GString *a_filter_string; + void lttv_trace_option(void *hook_data) { LttTrace *trace; @@ -75,6 +80,8 @@ static gboolean process_traceset(void *hook_data, void *call_data) lttv_state_add_event_hooks(&tscs->parent); if(a_stats) lttv_stats_add_event_hooks(tscs); + a_lttv_filter = lttv_filter_new(a_filter_string,(LttvTraceState*)tscs); + //lttv_traceset_context_add_hooks(tc, //before_traceset, after_traceset, NULL, before_trace, after_trace, //NULL, before_tracefile, after_tracefile, NULL, before_event, after_event); @@ -110,12 +117,14 @@ static gboolean process_traceset(void *hook_data, void *call_data) event_hook, NULL); + lttv_filter_destroy(a_lttv_filter); lttv_state_remove_event_hooks(&tscs->parent); if(a_stats) lttv_stats_remove_event_hooks(tscs); lttv_context_fini(tc); g_object_unref(tscs); g_info("BatchAnalysis end process traceset"); + return FALSE; } @@ -222,4 +231,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") + init, destroy, "state", "stats", "option","filter")