Re: [PATCH 1/4] tracing: keep ring buffer to minimum size tillused

From: Steven Rostedt
Date: Thu Mar 12 2009 - 11:14:45 EST



On Thu, 12 Mar 2009, Frederic Weisbecker wrote:
> >
> > +static int tracing_resize_ring_buffer(unsigned long size)
> > +{
> > + int ret;
> > +
> > + /*
> > + * If kernel or user changes the size of the ring buffer
> > + * it get completed.
> > + */
>
> Indeed :-)

That's my imitation of Shakespeare ;-)

>
> I just wonder about one thing.
> Sometimes I use trace_printk to trace some events that come on bootup.
> The only solution I see that could avoid me this minimum size would be
> to use ftrace=nop that I sometimes use to avoid ftrace selftests.

"Give that man a cigar!" Yep, you hit the jackpot! I was anticipating
this question and you even gave the same answer I would. That is to
use "ftrace=nop" on the command line ;-)

>
> I guess that few developers will be aware of this trick so may be
> it could be worth it to explain it on the ftrace documentation and
> on kernel.h (though a simple ftrace_printk as a parameter would be
> more obvious, or ftrace=printk).

Any ftrace=foobar would work. Even if foobar was not a tracer. So using
ftrace=foobar literally, would work.

>
> Anyway this patch is a very good thing, especially on embeeded systems.

Thanks,

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/