summaryrefslogtreecommitdiffstats
path: root/sunrpc
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2009-03-13 17:30:33 -0400
committerSteve Dickson <steved@redhat.com>2009-03-13 17:30:33 -0400
commitc63a15c69ebe891e6db6253ad16fda552bc842c9 (patch)
tree90a96ad88a781645a1482cbf20d2921ce6de1b05 /sunrpc
parent788852e336440db112134b8e24cce1cf029e4f6c (diff)
downloadsystemtap-c63a15c69ebe891e6db6253ad16fda552bc842c9.tar.gz
systemtap-c63a15c69ebe891e6db6253ad16fda552bc842c9.tar.xz
systemtap-c63a15c69ebe891e6db6253ad16fda552bc842c9.zip
Make rpc_call_sync() ignore LOOKUP(3): return -2 (ENOENT) errors
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/sunrpc.stp18
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") }