Re: Boot-time dynamic debugging?

From: Thomas Renninger
Date: Fri Aug 06 2010 - 10:00:41 EST


On Monday 02 August 2010 16:13:59 Thomas Renninger wrote:
> On Monday 02 August 2010 15:53:24 Pekka Enberg wrote:
...
> > Btw, can you easily enable all dev_dbg() calls with the boot parameter?
> I expect yes, but never explicitly tried it, dev_dbg should result in
> printk(KERN_DEBUG ...) after some macro/inline func processing.
My statement was wrong, from what I can see having a closer look:
printk(KERN_DEBUG...) messages will not show up, but dev_dbg will:
----------
asmlinkage int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2))) __cold;
static inline int printk(const char *s, ...)
__attribute__ ((format (printf, 1, 2)));
----------
I wonder whether the KERN_DEBUG can be differed at compile time
and could also result in a dynamic_pr_debug...

----------
#elif defined(CONFIG_DYNAMIC_DEBUG)
/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
#define pr_debug(fmt, ...) \
dynamic_pr_debug(fmt, ##__VA_ARGS__)

#elif defined(CONFIG_DYNAMIC_DEBUG)
#define dev_dbg(dev, format, ...) \
do { \
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
}
----------

Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/