From: Roel Kluin <12o3l@tiscali.nl>
To: lkml <linux-kernel@vger.kernel.org>
Subject: Debugging activated during runtime
Date: Sun, 28 Oct 2007 16:15:15 +0100 [thread overview]
Message-ID: <4724A783.9050400@tiscali.nl> (raw)
Wouldn't it be nice to be able to specify upon loading, or during runtime
to modules whether debug messages should be printed?
- 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).
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.
next reply other threads:[~2007-10-28 15:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-28 15:15 Roel Kluin [this message]
2007-10-28 15:23 ` Jan Engelhardt
2007-10-28 16:07 ` Roel Kluin
2007-10-28 16:18 ` Jan Engelhardt
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=4724A783.9050400@tiscali.nl \
--to=12o3l@tiscali.nl \
--cc=linux-kernel@vger.kernel.org \
/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®