On Wed, 16 Apr 2014 13:57:07 +0200, Martin Kepplinger said: > I'd like to just read all pr_debug() messages like pr_info(). Did you consider, um, I don't know? Just building a kernel that doesn't have CONFIG_DYNAMIC_DEBUG turned on? Or you could read Documentation/dynamic-debug-howto.txt, and find this: Debug Messages at Module Initialization Time ============================================ When "modprobe foo" is called, modprobe scans /proc/cmdline for foo.params, strips "foo.", and passes them to the kernel along with params given in modprobe args or /etc/modprob.d/*.conf files, in the following order: 1. # parameters given via /etc/modprobe.d/*.conf options foo dyndbg=+pt options foo dyndbg # defaults to +p 2. # foo.dyndbg as given in boot args, "foo." is stripped and passed foo.dyndbg=" func bar +p; func buz +mp" 3. # args to modprobe modprobe foo dyndbg==pmf # override previous settings These dyndbg queries are applied in order, with last having final say. This allows boot args to override or modify those from /etc/modprobe.d (sensible, since 1 is system wide, 2 is kernel or boot specific), and modprobe args to override both. In the foo.dyndbg="QUERY" form, the query must exclude "module foo". "foo" is extracted from the param-name, and applied to each query in "QUERY", and only 1 match-spec of each type is allowed. The dyndbg option is a "fake" module parameter, which means: - modules do not need to define it explicitly - every module gets it tacitly, whether they use pr_debug or not - it doesn't appear in /sys/module/$module/parameters/ To see it, grep the control file, or inspect /proc/cmdline. For CONFIG_DYNAMIC_DEBUG kernels, any settings given at boot-time (or enabled by -DDEBUG flag during compilation) can be disabled later via the sysfs interface if the debug messages are no longer needed: echo "module module_name -p" > <debugfs>/dynamic_debug/control
Attachment:
pgphOs1Rzzgay.pgp
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies