X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Fmodules%2Ftext%2FtextDump.c;h=1305eff8c8aa21ad6caa8fe89d2a16b585fe6b8e;hb=d04fa8383cb80eb3c8397edc0134e301f8f7a882;hp=b294b2cd87441286aecdc03410901d6530f5af58;hpb=73ccabb38349b1a44556c57f1bf36fb94be45628;p=lttv.git diff --git a/lttv/modules/text/textDump.c b/lttv/modules/text/textDump.c index b294b2cd..1305eff8 100644 --- a/lttv/modules/text/textDump.c +++ b/lttv/modules/text/textDump.c @@ -31,16 +31,16 @@ #include #include #include +#ifdef BABEL_CLEANUP #include #include +#endif +#include #include -#include -#include -#include #include #include -#include +#include static gboolean a_noevent, @@ -59,7 +59,7 @@ static LttvHooks *before_trace, *event_hook; - +#ifdef BABEL_CLEANUP static void print_path_tree(FILE *fp, GString *indent, LttvAttribute *tree) { @@ -197,7 +197,8 @@ print_tree(FILE *fp, GString *indent, LttvAttribute *tree) } } } - +#endif +#ifdef BABEL_CLEANUP static void print_stats(FILE *fp, LttvTracesetStats *tscs) { @@ -244,7 +245,7 @@ print_stats(FILE *fp, LttvTracesetStats *tscs) } g_string_free(indent, TRUE); } - +#endif /* Insert the hooks before and after each trace and tracefile, and for each event. Print a global header. */ @@ -254,7 +255,7 @@ static GString *a_string; static gboolean write_traceset_header(void *hook_data, void *call_data) { - LttvTracesetContext *tc = (LttvTracesetContext *)call_data; + LttvTraceset *traceset = (LttvTraceset *)call_data; g_info("TextDump traceset header"); @@ -265,7 +266,7 @@ static gboolean write_traceset_header(void *hook_data, void *call_data) /* Print the trace set header */ fprintf(a_file,"Trace set contains %d traces\n\n", - lttv_traceset_number(tc->ts)); + lttv_traceset_number(traceset)); return FALSE; } @@ -273,17 +274,18 @@ static gboolean write_traceset_header(void *hook_data, void *call_data) static gboolean write_traceset_footer(void *hook_data, void *call_data) { - LttvTracesetContext *tc = (LttvTracesetContext *)call_data; - +#ifdef BABEL_CLEAUP + LttvTraceset *traceset = (LttvTraceset *)call_data; +#endif g_info("TextDump traceset footer"); fprintf(a_file,"End trace set\n\n"); - +#ifdef BABEL_CLEANUP if(LTTV_IS_TRACESET_STATS(tc)) { lttv_stats_sum_traceset((LttvTracesetStats *)tc, ltt_time_infinite); print_stats(a_file, (LttvTracesetStats *)tc); } - +#endif if(a_file_name != NULL) fclose(a_file); return FALSE; @@ -306,11 +308,12 @@ static gboolean write_trace_header(void *hook_data, void *call_data) static int write_event_content(void *hook_data, void *call_data) { +#ifdef BABEL_CLEANUP gboolean result; LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes()); - - struct bt_ctf_event *event = (struct bt_ctf_event *)call_data; +#endif + LttvEvent *event = (LttvEvent *)call_data; #ifdef BABEL_CLEANUP LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -349,7 +352,7 @@ static int write_event_content(void *hook_data, void *call_data) #endif /* TODO 2012-03-12 Add state info */ - lttv_event_to_string(event, a_string, !a_no_field_names); + lttv_event_to_string(event, a_string, !a_no_field_names, TRUE); #ifdef BABEL_CLEANUP if(a_state) { @@ -483,5 +486,5 @@ static void destroy() LTTV_MODULE("textDump", "Print events in a file", \ "Produce a detailed text printout of a trace", \ - init, destroy, "stats", "batchAnalysis", "option", "print") + init, destroy, "batchAnalysis", "option", "print")