[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200722112525.694880d3@oasis.local.home>
Date: Wed, 22 Jul 2020 11:25:25 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: John Ogness <john.ogness@...utronix.de>
Cc: Vincent Whitchurch <vincent.whitchurch@...s.com>,
jbaron@...mai.com, mingo@...hat.com, kernel@...s.com,
corbet@....net, linux-kernel@...r.kernel.org,
Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [PATCH] dynamic debug: allow printing to trace event
On Wed, 22 Jul 2020 15:58:22 +0206
John Ogness <john.ogness@...utronix.de> wrote:
> >> +static void dynamic_printk(unsigned int flags, const char *fmt, ...)
> >> +{
> >> + if (flags & _DPRINTK_FLAGS_TRACE) {
> >> + va_list args;
> >> +
> >> + va_start(args, fmt);
> >> + /*
> >> + * All callers include the KERN_DEBUG prefix to keep the
> >> + * vprintk case simple; strip it out for tracing.
> >> + */
> >> + dynamic_trace(fmt + strlen(KERN_DEBUG), args);
>
> Do we really need a separate tracing event for this? Why not just:
>
> ftrace_vprintk(fmt + strlen(KERN_DEBUG), args);
It must be an event, one that can be enabled or disabled separately
from trace_printk().
If you are asking if this could be something like trace_printk(), which
ftrace_vprintk() is. The reason for that nasty banner when people use
trace_printk() is to keep developers from using it as their personal
debugging tool in production.
A trace_printk() can not be discretely disabled. It's either totally
on, or totally off. And since it is used for debugging, if there's
trace_printk()s all over the kernel, you will have to deal with the
noise of everyone else's trace_printk(), making trace_printk() useless.
Thus, NAK on using ftrace_vprintk() here.
-- Steve
Powered by blists - more mailing lists