aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/dynamic-debug-howto.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/dynamic-debug-howto.txt')
-rw-r--r--Documentation/dynamic-debug-howto.txt38
1 files changed, 33 insertions, 5 deletions
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 674c5663d346..f959909d7154 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -6,7 +6,7 @@ This document describes how to use the dynamic debug (ddebug) feature.
6 6
7Dynamic debug is designed to allow you to dynamically enable/disable kernel 7Dynamic debug is designed to allow you to dynamically enable/disable kernel
8code to obtain additional kernel information. Currently, if 8code to obtain additional kernel information. Currently, if
9CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_debug() calls can be 9CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_dbg() calls can be
10dynamically enabled per-callsite. 10dynamically enabled per-callsite.
11 11
12Dynamic debug has even more useful features: 12Dynamic debug has even more useful features:
@@ -24,9 +24,9 @@ Dynamic debug has even more useful features:
24 read to display the complete list of known debug statements, to help guide you 24 read to display the complete list of known debug statements, to help guide you
25 25
26Controlling dynamic debug Behaviour 26Controlling dynamic debug Behaviour
27=============================== 27===================================
28 28
29The behaviour of pr_debug()/dev_debug()s are controlled via writing to a 29The behaviour of pr_debug()/dev_dbg()s are controlled via writing to a
30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs 30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs
31filesystem, in order to make use of this feature. Subsequently, we refer to the 31filesystem, in order to make use of this feature. Subsequently, we refer to the
32control file as: <debugfs>/dynamic_debug/control. For example, if you want to 32control file as: <debugfs>/dynamic_debug/control. For example, if you want to
@@ -205,12 +205,40 @@ of the characters:
205 205
206The flags are: 206The flags are:
207 207
208f
209 Include the function name in the printed message
210l
211 Include line number in the printed message
212m
213 Include module name in the printed message
208p 214p
209 Causes a printk() message to be emitted to dmesg 215 Causes a printk() message to be emitted to dmesg
216t
217 Include thread ID in messages not generated from interrupt context
210 218
211Note the regexp ^[-+=][scp]+$ matches a flags specification. 219Note the regexp ^[-+=][flmpt]+$ matches a flags specification.
212Note also that there is no convenient syntax to remove all 220Note also that there is no convenient syntax to remove all
213the flags at once, you need to use "-psc". 221the flags at once, you need to use "-flmpt".
222
223
224Debug messages during boot process
225==================================
226
227To be able to activate debug messages during the boot process,
228even before userspace and debugfs exists, use the boot parameter:
229ddebug_query="QUERY"
230
231QUERY follows the syntax described above, but must not exceed 1023
232characters. The enablement of debug messages is done as an arch_initcall.
233Thus you can enable debug messages in all code processed after this
234arch_initcall via this boot parameter.
235On an x86 system for example ACPI enablement is a subsys_initcall and
236ddebug_query="file ec.c +p"
237will show early Embedded Controller transactions during ACPI setup if
238your machine (typically a laptop) has an Embedded Controller.
239PCI (or other devices) initialization also is a hot candidate for using
240this boot parameter for debugging purposes.
241
214 242
215Examples 243Examples
216======== 244========