mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Debugging activated during runtime
@ 2007-10-28 15:15 Roel Kluin
  2007-10-28 15:23 ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2007-10-28 15:15 UTC (permalink / raw)
  To: lkml

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-10-28 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-28 15:15 Debugging activated during runtime Roel Kluin
2007-10-28 15:23 ` Jan Engelhardt
2007-10-28 16:07   ` Roel Kluin
2007-10-28 16:18     ` Jan Engelhardt

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®