Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-29 Thread Steven Rostedt
On Wed, 29 Jun 2016 08:43:48 +0200 Jiri Olsa wrote: > > > diff --git a/include/linux/kernel.h b/include/linux/kernel.h > > index 94aa10ffe156..62693900cc4b 100644 > > --- a/include/linux/kernel.h > > +++ b/include/linux/kernel.h > > @@ -631,7 +631,24 @@ do {

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-29 Thread Jiri Olsa
On Tue, Jun 28, 2016 at 11:19:59PM +0200, Rasmus Villemoes wrote: SNIP > > - save_arg(void *); > > + if (spec.cpumask) { > > As I hinted in the other mail, I think it's better just to put the > fmt[1]=='b' here and not change struct printf_spec. > > > +

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Jiri Olsa
On Tue, Jun 28, 2016 at 06:06:47PM -0400, Steven Rostedt wrote: > On Tue, 28 Jun 2016 21:27:29 +0200 > Rasmus Villemoes wrote: > > > > I probably should make a trace_printk() that doesn't default to the > > > binary print, to handle things like this. > > > > > > trace_printk_ptr()? > > > > > >

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Steven Rostedt
On Tue, 28 Jun 2016 23:50:27 +0200 Rasmus Villemoes wrote: > On Tue, Jun 28 2016, Steven Rostedt wrote: > > > But people don't usually run "make smatch" on debug kernels. > > trace_printk() currently is not allowed to be used in the kernel. When > > it is used, a big ugly banner is posted on bo

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Steven Rostedt
On Tue, 28 Jun 2016 21:27:29 +0200 Rasmus Villemoes wrote: > > I probably should make a trace_printk() that doesn't default to the > > binary print, to handle things like this. > > > > trace_printk_ptr()? > > > > Or even just see if I can find a way that detects this in the fmt > > string. Hmm,

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Rasmus Villemoes
On Tue, Jun 28 2016, Steven Rostedt wrote: > But people don't usually run "make smatch" on debug kernels. > trace_printk() currently is not allowed to be used in the kernel. When > it is used, a big ugly banner is posted on boot up saying that the > kernel is in "debug mode" and is "unstable" (ev

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Rasmus Villemoes
On Tue, Jun 28 2016, Jiri Olsa wrote: > When using trace_printk for cpumask I've got wrong results, > some bitmaps were completely different from what I expected. > > Currently you get wrong results when using trace_printk > on local cpumask, like: > > void test(void) > { > struct cpuma

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Steven Rostedt
On Tue, 28 Jun 2016 21:27:29 +0200 Rasmus Villemoes wrote: > > I probably should make a trace_printk() that doesn't default to the > > binary print, to handle things like this. > > > > trace_printk_ptr()? > > > > Or even just see if I can find a way that detects this in the fmt > > string. Hmm

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Rasmus Villemoes
On Tue, Jun 28 2016, Steven Rostedt wrote: > On Tue, 28 Jun 2016 17:34:34 +0200 > Jiri Olsa wrote: > >> When using trace_printk for cpumask I've got wrong results, >> some bitmaps were completely different from what I expected. >> >> Currently you get wrong results when using trace_printk >> on

Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Steven Rostedt
On Tue, 28 Jun 2016 17:34:34 +0200 Jiri Olsa wrote: > When using trace_printk for cpumask I've got wrong results, > some bitmaps were completely different from what I expected. > > Currently you get wrong results when using trace_printk > on local cpumask, like: > > void test(void) > { >

[RFC/PATCH] lib/vsprintf: Add support to store cpumask

2016-06-28 Thread Jiri Olsa
When using trace_printk for cpumask I've got wrong results, some bitmaps were completely different from what I expected. Currently you get wrong results when using trace_printk on local cpumask, like: void test(void) { struct cpumask mask; ... trace_printk("mask '%*pbl'\n",