diff options
author | Steve Dickson <steved@redhat.com> | 2009-03-17 13:11:53 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-03-17 13:11:53 -0400 |
commit | 5483f74f16e735f088bfdaa7101a786759a6f12c (patch) | |
tree | ddace13baa532cde62d5795d66dae51f88daf18e /sunrpc | |
parent | 95f632ea0879c8841e93f3d4a15046af092cf2b4 (diff) | |
download | systemtap-5483f74f16e735f088bfdaa7101a786759a6f12c.tar.gz systemtap-5483f74f16e735f088bfdaa7101a786759a6f12c.tar.xz systemtap-5483f74f16e735f088bfdaa7101a786759a6f12c.zip |
Added the --show_all arugment to sunrpc
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/sunrpc.stp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/sunrpc/sunrpc.stp b/sunrpc/sunrpc.stp index 73c40cd..689577c 100644 --- a/sunrpc/sunrpc.stp +++ b/sunrpc/sunrpc.stp @@ -40,14 +40,15 @@ function rpcprogname:string(_clnt:long) %} global syn_clnt, syn_msg, syn_flags global asyn_clnt, asyn_msg, asyn_flags +global show_all probe module("sunrpc").function("rpc_call_sync") { - /* - printf("%s(%d): rpc_call_sync: %s: %s: flags 0x%x\n", - execname(), pid(), rpcprocname($msg), - rpcprogname($clnt), $flags); - */ + if (show_all) { + printf("%s(%d): rpc_call_sync:%s:%s: flags 0x%x\n", + execname(), pid(), rpcprocname($msg), + rpcprogname($clnt), $flags); + } syn_clnt = $clnt; syn_msg = $msg; syn_flags = $flags; @@ -64,11 +65,11 @@ probe module("sunrpc").function("rpc_call_sync").return } probe module("sunrpc").function("rpc_call_async") { - /* - printf("%s(%d): rpc_call_sync:%s:%s:flags 0x%x\n", - execname(), pid(), rpcprocname($msg), - rpcprogname($clnt), $flags); - */ + if (show_all) { + printf("%s(%d): rpc_call_sync:%s:%s:flags 0x%x\n", + execname(), pid(), rpcprocname($msg), + rpcprogname($clnt), $flags); + } asyn_clnt = $clnt; asyn_msg = $msg; asyn_flags = $flags; @@ -83,6 +84,17 @@ probe module("sunrpc").function("rpc_call_async").return } } } -probe begin { log("starting sunrpc probe") } +probe begin +{ + show_all = 0; + if (argc > 0) { + if (isinstr(argv[1], "--show_all")) { + show_all = 1 + } else { + error("Usage: sunrpc -- --show_all"); + } + } + log("starting sunrpc probe") +} probe end { log("ending sunrpc probe") } |