[ltt-dev] Babeltrace PATCH

Mathieu Desnoyers compudj at krystal.dyndns.org
Tue Aug 2 14:31:56 EDT 2011


* Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
[...]
> >  	fmt_write->close_trace(td_write);
> > -	fmt_read->close_trace(td_read);
> > +	destroy_array();
> > +	fprintf(stdout, "finished converting. output written to:\n%s\n",
> > +			opt_output_path);
> 
> Hrm, I'm not sure we want to print those messages in non-verbose mode.
> The idea is that the quick way to use babeltrace is to output the
> human-readable output to stdout, which can then be piped into another
> tool to perform treatment on the text data. So adding non-event
> information to stdout in every cases would pollute stdout. So would
> printing this with printf_verbose() be fine with you ?
> 
> Thanks,
> 
> Mathieu

Please note that the message continues below,

> 
> >  	exit(EXIT_SUCCESS);
> >  
> >  	/* Error handling */
> >  error_copy_trace:
> >  	fmt_write->close_trace(td_write);
> >  error_td_write:
> > -	fmt_read->close_trace(td_read);
> > +	destroy_array();
> >  error_td_read:
> >  	exit(EXIT_FAILURE);
> >  }
> > Index: babeltrace/include/babeltrace/babeltrace.h
> > ===================================================================
> > --- babeltrace.orig/include/babeltrace/babeltrace.h	2011-07-25 10:46:11.000000000 -0400
> > +++ babeltrace/include/babeltrace/babeltrace.h	2011-07-28 17:35:00.320708000 -0400
> > @@ -2,11 +2,13 @@
> >  #define _BABELTRACE_H
> >  
> >  #include <stdio.h>
> > +#include <glib.h>
> >  
> >  #define BABELTRACE_VERSION_MAJOR	0
> >  #define BABELTRACE_VERSION_MINOR	1
> >  
> >  extern int babeltrace_verbose, babeltrace_debug;
> > +extern GPtrArray *td_read_arr;
> 
> Why are you exporting td_read_arr ? It should instead be passed as
> parameter to convert_trace().
> 
> Thanks,
> 
> Mathieu
> 

Thank you,

Mathieu

> >  
> >  #define printf_verbose(fmt, args...)				\
> >  	do {							\
> > @@ -22,8 +24,7 @@
> >  
> >  struct trace_descriptor;
> >  
> > -int convert_trace(struct trace_descriptor *td_write,
> > -		  struct trace_descriptor *td_read);
> > +int convert_trace(struct trace_descriptor *td_write);
> >  
> >  extern int opt_field_names;
> >  
> > 
> > _______________________________________________
> > ltt-dev mailing list
> > ltt-dev at lists.casi.polymtl.ca
> > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> > 
> 
> -- 
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list