diff options
author | Greg Banks <gnb@melbourne.sgi.com> | 2009-02-05 20:54:26 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:38:27 -0400 |
commit | 9898abb3d23311fa227a7f46bf4e40fd2954057f (patch) | |
tree | f32e6f1b0422e491bf3db276f6f62467e4a21928 /Documentation/dynamic-debug-howto.txt | |
parent | 86151fdf38b3795f292b39defbff39d2684b9c8c (diff) |
Dynamic debug: allow simple quoting of words
Allow simple quoting of words in the dynamic debug control language.
This allows more natural specification when using the control language
to match against printk formats, e.g
#echo -n 'format "Setting node for non-present cpu" +p' >
/mnt/debugfs/dynamic_debug/control
instead of
#echo -n 'format Setting\040node\040for\040non-present\040cpu +p' >
/mnt/debugfs/dynamic_debug/control
Adjust the dynamic debug documention to describe that and provide a
new example. Adjust the existing examples in the documentation to
reflect the current whitespace escaping behaviour when reading the
control file. Fix some minor documentation trailing whitespace.
Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/dynamic-debug-howto.txt')
-rw-r--r-- | Documentation/dynamic-debug-howto.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index 68394825e86b..674c5663d346 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt | |||
@@ -49,10 +49,10 @@ via: | |||
49 | 49 | ||
50 | nullarbor:~ # cat <debugfs>/dynamic_debug/control | 50 | nullarbor:~ # cat <debugfs>/dynamic_debug/control |
51 | # filename:lineno [module]function flags format | 51 | # filename:lineno [module]function flags format |
52 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:323 [svcxprt_rdma]svc_rdma_cleanup - "SVCRDMA\040Module\040Removed,\040deregister\040RPC\040RDMA\040transport\012" | 52 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:323 [svcxprt_rdma]svc_rdma_cleanup - "SVCRDMA Module Removed, deregister RPC RDMA transport\012" |
53 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:341 [svcxprt_rdma]svc_rdma_init - "\011max_inline\040\040\040\040\040\040\040:\040%d\012" | 53 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:341 [svcxprt_rdma]svc_rdma_init - "\011max_inline : %d\012" |
54 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:340 [svcxprt_rdma]svc_rdma_init - "\011sq_depth\040\040\040\040\040\040\040\040\040:\040%d\012" | 54 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:340 [svcxprt_rdma]svc_rdma_init - "\011sq_depth : %d\012" |
55 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:338 [svcxprt_rdma]svc_rdma_init - "\011max_requests\040\040\040\040\040:\040%d\012" | 55 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:338 [svcxprt_rdma]svc_rdma_init - "\011max_requests : %d\012" |
56 | ... | 56 | ... |
57 | 57 | ||
58 | 58 | ||
@@ -72,7 +72,7 @@ you can view all the debug statement callsites with any non-default flags: | |||
72 | 72 | ||
73 | nullarbor:~ # awk '$3 != "-"' <debugfs>/dynamic_debug/control | 73 | nullarbor:~ # awk '$3 != "-"' <debugfs>/dynamic_debug/control |
74 | # filename:lineno [module]function flags format | 74 | # filename:lineno [module]function flags format |
75 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c:1603 [sunrpc]svc_send p "svc_process:\040st_sendto\040returned\040%d\012" | 75 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c:1603 [sunrpc]svc_send p "svc_process: st_sendto returned %d\012" |
76 | 76 | ||
77 | 77 | ||
78 | Command Language Reference | 78 | Command Language Reference |
@@ -166,11 +166,15 @@ format | |||
166 | entire format, only some part. Whitespace and other | 166 | entire format, only some part. Whitespace and other |
167 | special characters can be escaped using C octal character | 167 | special characters can be escaped using C octal character |
168 | escape \ooo notation, e.g. the space character is \040. | 168 | escape \ooo notation, e.g. the space character is \040. |
169 | Alternatively, the string can be enclosed in double quote | ||
170 | characters (") or single quote characters ('). | ||
169 | Examples: | 171 | Examples: |
170 | 172 | ||
171 | format svcrdma: // many of the NFS/RDMA server dprintks | 173 | format svcrdma: // many of the NFS/RDMA server dprintks |
172 | format readahead // some dprintks in the readahead cache | 174 | format readahead // some dprintks in the readahead cache |
173 | format nfsd:\040SETATTR // how to match a format with whitespace | 175 | format nfsd:\040SETATTR // one way to match a format with whitespace |
176 | format "nfsd: SETATTR" // a neater way to match a format with whitespace | ||
177 | format 'nfsd: SETATTR' // yet another way to match a format with whitespace | ||
174 | 178 | ||
175 | line | 179 | line |
176 | The given line number or range of line numbers is compared | 180 | The given line number or range of line numbers is compared |
@@ -230,3 +234,7 @@ nullarbor:~ # echo -n 'func svc_process +p' > | |||
230 | // disable all 12 messages in the function svc_process() | 234 | // disable all 12 messages in the function svc_process() |
231 | nullarbor:~ # echo -n 'func svc_process -p' > | 235 | nullarbor:~ # echo -n 'func svc_process -p' > |
232 | <debugfs>/dynamic_debug/control | 236 | <debugfs>/dynamic_debug/control |
237 | |||
238 | // enable messages for NFS calls READ, READLINK, READDIR and READDIR+. | ||
239 | nullarbor:~ # echo -n 'format "nfsd: READ" +p' > | ||
240 | <debugfs>/dynamic_debug/control | ||