Re: [PATCH] dynamic_debug: Add an option to enable dynamic debug for modules only
From: Orson Zhai
Date: Mon Apr 13 2020 - 01:02:56 EST
On Fri, Apr 10, 2020 at 02:44:14PM +0200, Greg Kroah-Hartman wrote:
> On Fri, Apr 10, 2020 at 08:33:04PM +0800, Orson Zhai wrote:
> > From: Orson Zhai <orson.zhai@xxxxxxxxxx>
> >
> > Instead of enabling dynamic debug globally with CONFIG_DYNAMIC_DEBUG,
> > CONFIG_DYNAMIC_DEBUG_CORE will only enable core function of dynamic
> > debug. With the DEBUG_MODULE defined for any modules, dynamic debug
> > will be tied to them.
> >
> > This is useful for people who only want to enable dynamic debug for
> > kernel modules without worrying about kernel image size and memory
> > consumption is increasing too much.
> >
> > Signed-off-by: Orson Zhai <orson.zhai@xxxxxxxxxx>
> > ---
> > Documentation/admin-guide/dynamic-debug-howto.rst | 7 +++++--
> > include/linux/dev_printk.h | 6 ++++--
> > include/linux/dynamic_debug.h | 2 +-
> > include/linux/printk.h | 14 +++++++++-----
> > lib/Kconfig.debug | 12 ++++++++++++
> > lib/Makefile | 2 +-
> > lib/dynamic_debug.c | 9 +++++++--
> > 7 files changed, 39 insertions(+), 13 deletions(-)
>
> Crazy idea, I like it :)
Jason was highly appreciated for his suggestion to my RFC patch before this.
>
> Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Thank you very much.
Best,
Orson