diff options
Diffstat (limited to 'sunrpc/sunrpc.stp')
-rw-r--r-- | sunrpc/sunrpc.stp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sunrpc/sunrpc.stp b/sunrpc/sunrpc.stp index eb073f4..15c9dcd 100644 --- a/sunrpc/sunrpc.stp +++ b/sunrpc/sunrpc.stp @@ -2,6 +2,16 @@ #include <linux/sunrpc/sched.h> #include <linux/sunrpc/clnt.h> %} +function rpcprocnum:long(_msg:long) +%{ + struct rpc_message *msg = (struct rpc_message *)(long) kread(&(THIS->_msg)); + struct rpc_procinfo *rpc_proc = + (struct rpc_procinfo *)(long) kread(&(msg->rpc_proc)); + + THIS->__retvalue = rpc_proc->p_proc; + + CATCH_DEREF_FAULT(); +%} function rpcprocname:string(_msg:long) %{ struct rpc_message *msg = (struct rpc_message *)(long) kread(&(THIS->_msg)); @@ -29,9 +39,11 @@ probe module("sunrpc").function("rpc_call_sync") probe module("sunrpc").function("rpc_call_sync").return { if ($return) { - printf("%s(%d): rpc_call_sync: %s: return %d (%s)\n", - execname(), pid(), rpcprocname(msg), $return, - errno_str($return)); + if (rpcprocnum(msg) != 2 && $return != -2) { + printf("%s(%d): rpc_call_sync: %s: return %d (%s)\n", + execname(), pid(), rpcprocname(msg), $return, + errno_str($return)); + } } } probe begin { log("starting sunrpc probe") } |