[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0710281618520.30465@fbirervta.pbzchgretzou.qr>
Date: Sun, 28 Oct 2007 16:23:45 +0100 (CET)
From: Jan Engelhardt <jengelh@...putergmbh.de>
To: Roel Kluin <12o3l@...cali.nl>
cc: lkml <linux-kernel@...r.kernel.org>
Subject: Re: Debugging activated during runtime
On Oct 28 2007 16:15, Roel Kluin wrote:
>
>Wouldn't it be nice to be able to specify upon loading, or during runtime
>to modules whether debug messages should be printed?
modprobe ark3116 debug=1
Nothing new.
>- No kernel recompile needed for debugging.
>- Less *_DEBUG options required in menuconfig.
>
>How I think this could work:
>Add to the module struct a bool to denote debugging state. If set, pr_debug
>forwards messages to printk.
>
>Another advantage:
>- A module could be loaded after an unexpected conditions (e.g. after a BUG_ON).
After a BUG_ON, you are probably next to a panic.
>Caveats I can see right now:
>- For modules often loaded during boot this may not be a good solution.
>
>Alternatively, instead of a bool for the debug state, the module struct could
>also get a log-level flag: messages below that level won't be printed.
What problem are you trying to solve? YOu can pass the module
a parameter that can control how printk-verbose it will act. That is
entirely in your hands, and it does not need to extend struct module.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists