X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2FtextDump.c;h=24b266a285212c2366df8e8ddef7e2ee9ae8d93c;hb=90ffd2adca8a23a36f3a9b7279f40797907723de;hp=73cd5b90a25c1e2b7be740b542e4a246ac50125b;hpb=b445142a71748192520cfd645b4963e23070a486;p=lttv.git diff --git a/ltt/branches/poly/lttv/textDump.c b/ltt/branches/poly/lttv/textDump.c index 73cd5b90..24b266a2 100644 --- a/ltt/branches/poly/lttv/textDump.c +++ b/ltt/branches/poly/lttv/textDump.c @@ -218,8 +218,9 @@ print_stats(FILE *fp, LttvTracesetStats *tscs) for(i = 0 ; i < nb ; i++) { tcs = (LttvTraceStats *)(LTTV_TRACESET_CONTEXT(tscs)->traces[i]); desc = ltt_trace_system_description(tcs->parent.parent.t); - fprintf(fp, "Trace on system %s at time %d secs:\n", desc->node_name, - desc->trace_start.tv_sec); + fprintf(fp, "Trace on system %s at time %d secs:\n", + ltt_trace_system_description_node_name(desc), + (ltt_trace_system_description_trace_start_time(desc)).tv_sec); saved_length = indent->len; g_string_append(indent, " "); print_tree(fp, indent, tcs->stats); @@ -279,8 +280,10 @@ static gboolean write_trace_header(void *hook_data, void *call_data) LttSystemDescription *system = ltt_trace_system_description(tc->t); - fprintf(a_file," Trace from %s in %s\n%s\n\n", system->node_name, - system->domain_name, system->description); + fprintf(a_file," Trace from %s in %s\n%s\n\n", + ltt_trace_system_description_node_name(system), + ltt_trace_system_description_domain_name(system), + ltt_trace_system_description_description(system)); return FALSE; } @@ -299,7 +302,7 @@ static int write_event_content(void *hook_data, void *call_data) g_string_append_printf(a_string,"\n"); if(a_state) { - g_string_append_printf(a_string, " %s", + g_string_append_printf(a_string, " %s ", g_quark_to_string(tfs->process->state->s)); } @@ -316,6 +319,8 @@ G_MODULE_EXPORT void init(LttvModule *self, int argc, char **argv) g_info("Init textDump.c"); + lttv_module_require(self, "libbatchAnalysis", argc, argv); + a_string = g_string_new(""); a_file_name = NULL; @@ -337,13 +342,13 @@ G_MODULE_EXPORT void init(LttvModule *self, int argc, char **argv) LTTV_OPT_NONE, &a_state, NULL, NULL); a_cpu_stats = FALSE; - lttv_option_add("cpu_stats", 's', + lttv_option_add("cpu_stats", 'c', "write the per cpu statistics", "", LTTV_OPT_NONE, &a_cpu_stats, NULL, NULL); a_process_stats = FALSE; - lttv_option_add("process_stats", 's', + lttv_option_add("process_stats", 'p', "write the per process statistics", "", LTTV_OPT_NONE, &a_process_stats, NULL, NULL);