X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Ftext%2FtextDump.c;h=2e2e6c53fea9358c16362093441528eaf46ca9a7;hb=54d067f5be6093549ec741f6455b0b884b8076fd;hp=37dcf7d31997b7a873523340597335f9b08b5348;hpb=b91e751bfd4702dd0e73008727b38d9043f609c5;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/text/textDump.c b/ltt/branches/poly/lttv/modules/text/textDump.c index 37dcf7d3..2e2e6c53 100644 --- a/ltt/branches/poly/lttv/modules/text/textDump.c +++ b/ltt/branches/poly/lttv/modules/text/textDump.c @@ -36,13 +36,11 @@ #include #include #include -#include #include -#include #include static gboolean - a_field_names, + a_no_field_names, a_state, a_cpu_stats, a_process_stats, @@ -335,14 +333,15 @@ static int write_event_content(void *hook_data, void *call_data) tfc->t_context->t,tfc,NULL,NULL)) return FALSE; - lttv_event_to_string(e, a_string, TRUE, a_field_names, tfs); - g_string_append_printf(a_string,"\n"); + lttv_event_to_string(e, a_string, TRUE, !a_no_field_names, tfs); if(a_state) { g_string_append_printf(a_string, " %s ", g_quark_to_string(process->state->s)); } + g_string_append_printf(a_string,"\n"); + fputs(a_string->str, a_file); return FALSE; } @@ -364,14 +363,14 @@ static void init() "file name", LTTV_OPT_STRING, &a_file_name, NULL, NULL); - a_field_names = FALSE; - lttv_option_add("field_names", 'l', - "write the field names for each event", + a_no_field_names = FALSE; + lttv_option_add("field_names", 's', + "do not write the field names for each event", "", - LTTV_OPT_NONE, &a_field_names, NULL, NULL); + LTTV_OPT_NONE, &a_no_field_names, NULL, NULL); a_state = FALSE; - lttv_option_add("process_state", 's', + lttv_option_add("process_state", 'r', "write the pid and state for each event", "", LTTV_OPT_NONE, &a_state, NULL, NULL);