From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Jason Baron <jbaron@akamai.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
"mingo@redhat.com" <mingo@redhat.com>, kernel <kernel@axis.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"pmladek@suse.com" <pmladek@suse.com>,
"sergey.senozhatsky@gmail.com" <sergey.senozhatsky@gmail.com>,
"john.ogness@linutronix.de" <john.ogness@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] dynamic debug: allow printing to trace event
Date: Tue, 25 Aug 2020 17:32:26 +0200 [thread overview]
Message-ID: <20200825153226.2wturxg7zu3bw5li@axis.com> (raw)
In-Reply-To: <461439ab-0720-e3cc-f49f-f294fbba4129@akamai.com>
On Fri, Aug 14, 2020 at 11:30:34PM +0200, Jason Baron wrote:
> On 8/14/20 1:15 PM, Steven Rostedt wrote:
> > On Fri, 14 Aug 2020 15:31:51 +0200
> > Vincent Whitchurch <vincent.whitchurch@axis.com> wrote:
> >> index aa9ff9e1c0b3..f599ed21ecc5 100644
> >> --- a/include/linux/dynamic_debug.h
> >> +++ b/include/linux/dynamic_debug.h
> >> @@ -27,13 +27,16 @@ struct _ddebug {
> >> * writes commands to <debugfs>/dynamic_debug/control
> >> */
> >> #define _DPRINTK_FLAGS_NONE 0
> >> -#define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */
> >> +#define _DPRINTK_FLAGS_PRINTK (1<<0) /* printk() a message using the format */
> >
> > The above looks like a cleanup unrelated to this patch, and probably
> > should be on its own.
>
> I read it as we used to have this one thing called 'print', which really meant
> printk, but now that we also have the ability to output to the trace buffer,
> what does 'print' mean now? So I read it as being part of this change.
Yes, that's what was intended, but I think it makes sense to split it
out as Steven suggested so I've done that now (and also renamed the
combined flag to the less ambiguous _DPRINTK_FLAGS_ENABLE).
>
> >
> >> #define _DPRINTK_FLAGS_INCL_MODNAME (1<<1)
> >> #define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2)
> >> #define _DPRINTK_FLAGS_INCL_LINENO (1<<3)
> >> #define _DPRINTK_FLAGS_INCL_TID (1<<4)
> >> +#define _DPRINTK_FLAGS_TRACE (1<<5)
> >> +#define _DPRINTK_FLAGS_PRINT (_DPRINTK_FLAGS_PRINTK | \
> >> + _DPRINTK_FLAGS_TRACE)
>
>
> Is _DPRINTK_FLAGS_PRINT actually used anywhere? Looks to me like
> it can be removed.
It's used from DYNAMIC_DEBUG_BRANCH() as well as from
lib/dynamic_debug.c to check if the location is enabled.
> This is a feature I've wanted for dynamic debug for a while. Thanks for
> implementing it!
>
> Dynamic can be enabled on the command line in order to print things early
> in boot (I think ftrace can as well), I want to make sure that there are
> no ordering issues here? And things wouldn't blow up if we enable printing
> to the ftrace buffer early on via dyanmic debug?
I tried enabling all dynamic debug locations and tracing via the command
line and that worked fine:
dyndbg="file * +x" trace_event=printk:*
next prev parent reply other threads:[~2020-08-25 15:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 13:31 Vincent Whitchurch
2020-08-14 17:15 ` Steven Rostedt
2020-08-14 21:30 ` Jason Baron
2020-08-25 15:32 ` Vincent Whitchurch [this message]
2020-08-25 15:39 ` Vincent Whitchurch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200825153226.2wturxg7zu3bw5li@axis.com \
--to=vincent.whitchurch@axis.com \
--cc=corbet@lwn.net \
--cc=jbaron@akamai.com \
--cc=john.ogness@linutronix.de \
--cc=kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®