[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200722144952.2mewrgebgkyr2zyf@axis.com>
Date: Wed, 22 Jul 2020 16:49:52 +0200
From: Vincent Whitchurch <vincent.whitchurch@...s.com>
To: John Ogness <john.ogness@...utronix.de>
CC: Steven Rostedt <rostedt@...dmis.org>,
"jbaron@...mai.com" <jbaron@...mai.com>,
"mingo@...hat.com" <mingo@...hat.com>, kernel <kernel@...s.com>,
"corbet@....net" <corbet@....net>,
"linux-kernel@...r.kernel.org" <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, Jul 22, 2020 at 03:52:22PM +0200, John Ogness wrote:
> On 2020-07-21, Steven Rostedt <rostedt@...dmis.org> wrote:
> >> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> >> index 321437bbf87d..9f6d8867af7c 100644
> >> --- a/lib/dynamic_debug.c
> >> +++ b/lib/dynamic_debug.c
> [..]
> >> +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);
Thanks, I tried that out now and it seems to work, but it results in the
trace_printk() splat (even if the feature is not used), though:
**********************************************************
** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
** **
** trace_printk() being used. Allocating extra memory. **
** **
** This means that this is a DEBUG kernel and it is **
** unsafe for production use. **
** **
** If you see this message and you are not debugging **
** the kernel, report this immediately to your vendor! **
** **
** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
**********************************************************
Powered by blists - more mailing lists