Re: [RESEND PATCH v2 1/2] tracing: Add array printing helpers

2015-01-16 Thread Steven Rostedt
On Fri, 16 Jan 2015 10:14:14 + Javi Merino wrote: > > BUG() is a bit extreme don't you think? I'm not sure it even > > deserves a WARN_ON(). > > Ok, I used BUG() because that's what you suggested: > > http://article.gmane.org/gmane.linux.kernel/1846749 > Whoever suggested that was an idi

Re: [RESEND PATCH v2 1/2] tracing: Add array printing helpers

2015-01-16 Thread Javi Merino
On Fri, Jan 16, 2015 at 02:22:02AM +, Steven Rostedt wrote: > On Thu, 15 Jan 2015 16:50:58 + > Javi Merino wrote: > > > +const char * > > +ftrace_print_array_seq(struct trace_seq *p, const void *buf, int > > buf_len, > > + size_t el_size) > > +{ > > + const char *ret =

Re: [RESEND PATCH v2 1/2] tracing: Add array printing helpers

2015-01-15 Thread Steven Rostedt
On Thu, 15 Jan 2015 16:50:58 + Javi Merino wrote: > +const char * > +ftrace_print_array_seq(struct trace_seq *p, const void *buf, int > buf_len, > +size_t el_size) > +{ > + const char *ret = trace_seq_buffer_ptr(p); > + const char *prefix = ""; > + void *ptr =

[RESEND PATCH v2 1/2] tracing: Add array printing helpers

2015-01-15 Thread Javi Merino
From: Dave Martin If a trace event contains an array, there is currently no standard way to format this for text output. Drivers are currently hacking around this by a) local hacks that use the trace_seq functionailty directly, or b) just not printing that information. For fixed size arrays, fo