dynamic debug: combine dprintk and dynamic printk
This patch combines Greg Bank's dprintk() work with the existing dynamic printk patchset, we are now calling it 'dynamic debug'. The new feature of this patchset is a richer /debugfs control file interface, (an example output from my system is at the bottom), which allows fined grained control over the the debug output. The output can be controlled by function, file, module, format string, and line number. for example, enabled all debug messages in module 'nf_conntrack': echo -n 'module nf_conntrack +p' > /mnt/debugfs/dynamic_debug/control to disable them: echo -n 'module nf_conntrack -p' > /mnt/debugfs/dynamic_debug/control A further explanation can be found in the documentation patch. Signed-off-by: Greg Banks <gnb@sgi.com> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
095160aee9
commit
e9d376f0fa
@ -16,7 +16,7 @@
|
||||
#include <linux/log2.h>
|
||||
#include <linux/typecheck.h>
|
||||
#include <linux/ratelimit.h>
|
||||
#include <linux/dynamic_printk.h>
|
||||
#include <linux/dynamic_debug.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/bug.h>
|
||||
|
||||
@ -358,7 +358,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
||||
#if defined(DEBUG)
|
||||
#define pr_debug(fmt, ...) \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
|
||||
#elif defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#define pr_debug(fmt, ...) do { \
|
||||
dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
Reference in New Issue
Block a user