[PATCH 23/25] dynamic_debug: allow wildcard modname in boot-line query

From: jim . cromie
Date: Wed Nov 30 2011 - 14:58:25 EST


From: Jim Cromie <jim.cromie@xxxxxxxxx>

Allow use of "*.dyndbg=+p" in boot-line, to turn on all debugging.
This works almost exactly like ddebug_query="+p"; it enables all
callsites for builtin modules, but does so after ddebug_query=... is
processed, and in the order of given mod.dyndbg args.

IOW, these are equivalent:

ddebug_query="+p" foo.dyndbg=+p
ddebug_query="" *.dyndbg=+p foo.dyndbg=+p

So this turns on module, function, line flags on all callsites,
which can then be enabled separately:

*.dyndbg="+mfl"

Note that order matters if flags are set rather than added (= not +),
these are slightly different:

" foo.dyndbg=p *.dyndbg=+mf "
" *.dyndbg=+mf foo.dyndbg=p "

This obsoletes the remaining usage of ddebug_query; module specific
uses of ddebug_query were already covered by modname.dyndbg="...". It
may however offend the tastes of some, or perhaps "*" should be
spelled as "dynamic_debug". Removing ddebug_query probably also needs
a deprecation cycle, so I've deferred.

Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
---
lib/dynamic_debug.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index fc3f68a..a077cd4 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -946,7 +946,8 @@ static __init void ddebug_boot_parse_args(void)
if (verbose)
pr_info("Param: %s, val: %s\n", param, val);

- ddebug_exec_queries((val ? val : "+p"), module);
+ ddebug_exec_queries((val ? val : "+p"),
+ !strcmp(module, "*") ? NULL : module);
}
}

--
1.7.7.3

--
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/