diff options
Diffstat (limited to 'Documentation/dynamic-debug-howto.txt')
-rw-r--r-- | Documentation/dynamic-debug-howto.txt | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index f959909d7154..74e6c7782678 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt | |||
@@ -12,7 +12,7 @@ dynamically enabled per-callsite. | |||
12 | Dynamic debug has even more useful features: | 12 | Dynamic debug has even more useful features: |
13 | 13 | ||
14 | * Simple query language allows turning on and off debugging statements by | 14 | * Simple query language allows turning on and off debugging statements by |
15 | matching any combination of: | 15 | matching any combination of 0 or 1 of: |
16 | 16 | ||
17 | - source filename | 17 | - source filename |
18 | - function name | 18 | - function name |
@@ -79,31 +79,24 @@ Command Language Reference | |||
79 | ========================== | 79 | ========================== |
80 | 80 | ||
81 | At the lexical level, a command comprises a sequence of words separated | 81 | At the lexical level, a command comprises a sequence of words separated |
82 | by whitespace characters. Note that newlines are treated as word | 82 | by spaces or tabs. So these are all equivalent: |
83 | separators and do *not* end a command or allow multiple commands to | ||
84 | be done together. So these are all equivalent: | ||
85 | 83 | ||
86 | nullarbor:~ # echo -c 'file svcsock.c line 1603 +p' > | 84 | nullarbor:~ # echo -c 'file svcsock.c line 1603 +p' > |
87 | <debugfs>/dynamic_debug/control | 85 | <debugfs>/dynamic_debug/control |
88 | nullarbor:~ # echo -c ' file svcsock.c line 1603 +p ' > | 86 | nullarbor:~ # echo -c ' file svcsock.c line 1603 +p ' > |
89 | <debugfs>/dynamic_debug/control | 87 | <debugfs>/dynamic_debug/control |
90 | nullarbor:~ # echo -c 'file svcsock.c\nline 1603 +p' > | ||
91 | <debugfs>/dynamic_debug/control | ||
92 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > | 88 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > |
93 | <debugfs>/dynamic_debug/control | 89 | <debugfs>/dynamic_debug/control |
94 | 90 | ||
95 | Commands are bounded by a write() system call. If you want to do | 91 | Command submissions are bounded by a write() system call. |
96 | multiple commands you need to do a separate "echo" for each, like: | 92 | Multiple commands can be written together, separated by ';' or '\n'. |
97 | 93 | ||
98 | nullarbor:~ # echo 'file svcsock.c line 1603 +p' > /proc/dprintk ;\ | 94 | ~# echo "func pnpacpi_get_resources +p; func pnp_assign_mem +p" \ |
99 | > echo 'file svcsock.c line 1563 +p' > /proc/dprintk | 95 | > <debugfs>/dynamic_debug/control |
100 | 96 | ||
101 | or even like: | 97 | If your query set is big, you can batch them too: |
102 | 98 | ||
103 | nullarbor:~ # ( | 99 | ~# cat query-batch-file > <debugfs>/dynamic_debug/control |
104 | > echo 'file svcsock.c line 1603 +p' ;\ | ||
105 | > echo 'file svcsock.c line 1563 +p' ;\ | ||
106 | > ) > /proc/dprintk | ||
107 | 100 | ||
108 | At the syntactical level, a command comprises a sequence of match | 101 | At the syntactical level, a command comprises a sequence of match |
109 | specifications, followed by a flags change specification. | 102 | specifications, followed by a flags change specification. |
@@ -144,11 +137,12 @@ func | |||
144 | func svc_tcp_accept | 137 | func svc_tcp_accept |
145 | 138 | ||
146 | file | 139 | file |
147 | The given string is compared against either the full | 140 | The given string is compared against either the full pathname, the |
148 | pathname or the basename of the source file of each | 141 | src-root relative pathname, or the basename of the source file of |
149 | callsite. Examples: | 142 | each callsite. Examples: |
150 | 143 | ||
151 | file svcsock.c | 144 | file svcsock.c |
145 | file kernel/freezer.c | ||
152 | file /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c | 146 | file /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c |
153 | 147 | ||
154 | module | 148 | module |