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