dynamic_debug: add wildcard support to filter files/functions/modules
authorDu, Changbin <changbin.du@gmail.com>
Thu, 23 Jan 2014 23:54:14 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:55 +0000 (16:36 -0800)
commit578b1e0701af34f9ef69daabda4431f1e8501109
tree0a48226089ca5e00382dd24fcebaa38c3318b9c1
parenta3d2cca43cd31479d4f0414b4d014c4400a4e6d6
dynamic_debug: add wildcard support to filter files/functions/modules

Add wildcard '*'(matches zero or more characters) and '?' (matches one
character) support when qurying debug flags.

Now we can open debug messages using keywords. eg:
1. open debug logs in all usb drivers
    echo "file drivers/usb/* +p" > <debugfs>/dynamic_debug/control
2.  open debug logs for usb xhci code
    echo "file *xhci* +p" > <debugfs>/dynamic_debug/control

Signed-off-by: Du, Changbin <changbin.du@gmail.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/dynamic_debug.c