From: Mathieu Desnoyers Date: Tue, 7 Feb 2012 14:32:29 +0000 (-0500) Subject: Use environment information for extra fields X-Git-Tag: v0.10~5 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=1842a4c801d0878adf40862fda0c310a52a6fdd2 Use environment information for extra fields Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c index 150cf3a5..b7889ec0 100644 --- a/formats/ctf-text/ctf-text.c +++ b/formats/ctf-text/ctf-text.c @@ -248,36 +248,36 @@ int ctf_text_write_event(struct stream_pos *ppos, else fprintf(pos->fp, " "); } - if ((opt_trace_domain_field && !opt_all_fields) && stream_class->trace->domain[0] != '\0') { + if ((opt_trace_domain_field && !opt_all_fields) && stream_class->trace->env.domain[0] != '\0') { set_field_names_print(pos, ITEM_HEADER); if (pos->print_names) { fprintf(pos->fp, "trace:domain = "); } - fprintf(pos->fp, "%s", stream_class->trace->domain); + fprintf(pos->fp, "%s", stream_class->trace->env.domain); if (pos->print_names) fprintf(pos->fp, ", "); dom_print = 1; } - if ((opt_trace_procname_field && !opt_all_fields) && stream_class->trace->procname[0] != '\0') { + if ((opt_trace_procname_field && !opt_all_fields) && stream_class->trace->env.procname[0] != '\0') { set_field_names_print(pos, ITEM_HEADER); if (pos->print_names) { fprintf(pos->fp, "trace:procname = "); } else if (dom_print) { fprintf(pos->fp, ":"); } - fprintf(pos->fp, "%s", stream_class->trace->procname); + fprintf(pos->fp, "%s", stream_class->trace->env.procname); if (pos->print_names) fprintf(pos->fp, ", "); dom_print = 1; } - if ((opt_trace_vpid_field && !opt_all_fields) && stream_class->trace->vpid[0] != '\0') { + if ((opt_trace_vpid_field && !opt_all_fields) && stream_class->trace->env.vpid != -1) { set_field_names_print(pos, ITEM_HEADER); if (pos->print_names) { fprintf(pos->fp, "trace:vpid = "); } else if (dom_print) { fprintf(pos->fp, ":"); } - fprintf(pos->fp, "%s", stream_class->trace->vpid); + fprintf(pos->fp, "%d", stream_class->trace->env.vpid); if (pos->print_names) fprintf(pos->fp, ", "); dom_print = 1;