summaryrefslogtreecommitdiff
path: root/Documentation/dynamic-debug-howto.txt
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2010-08-06 16:11:02 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:16:42 -0700
commita648ec05bb950fae2f35d0490ddd6cf15010af72 (patch)
treecde3ca36db486e51d85c31619bf67f8d60215179 /Documentation/dynamic-debug-howto.txt
parentfd89cfb8718753459fcea3fe6103d19de5e86c9b (diff)
Dynamic Debug: Introduce ddebug_query= boot parameter
Dynamic debug lacks the ability to enable debug messages at boot time. One could patch initramfs or service startup scripts to write to /sys/../dynamic_debug/control, but this sucks. This patch makes it possible to pass a query in the same format one can write to /sys/../dynamic_debug/control via boot param. When dynamic debug gets initialized, this query will automatically be applied. Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: jbaron@redhat.com Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/dynamic-debug-howto.txt')
-rw-r--r--Documentation/dynamic-debug-howto.txt22
1 files changed, 21 insertions, 1 deletions
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 674c5663d346..58ea64a96165 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -24,7 +24,7 @@ Dynamic debug has even more useful features:
read to display the complete list of known debug statements, to help guide you
Controlling dynamic debug Behaviour
-===============================
+===================================
The behaviour of pr_debug()/dev_debug()s are controlled via writing to a
control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs
@@ -212,6 +212,26 @@ Note the regexp ^[-+=][scp]+$ matches a flags specification.
Note also that there is no convenient syntax to remove all
the flags at once, you need to use "-psc".
+
+Debug messages during boot process
+==================================
+
+To be able to activate debug messages during the boot process,
+even before userspace and debugfs exists, use the boot parameter:
+ddebug_query="QUERY"
+
+QUERY follows the syntax described above, but must not exceed 1023
+characters. The enablement of debug messages is done as an arch_initcall.
+Thus you can enable debug messages in all code processed after this
+arch_initcall via this boot parameter.
+On an x86 system for example ACPI enablement is a subsys_initcall and
+ddebug_query="file ec.c +p"
+will show early Embedded Controller transactions during ACPI setup if
+your machine (typically a laptop) has an Embedded Controller.
+PCI (or other devices) initialization also is a hot candidate for using
+this boot parameter for debugging purposes.
+
+
Examples
========