summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2009-04-02 16:32:48 -0400
committerSteve Dickson <steved@redhat.com>2009-04-02 16:32:48 -0400
commit7fc13f1a2640db17b06352c35ce0b99ed6582f9d (patch)
tree872268e8d126d3f60372c57f146f646d812f65a3
parent7075e54a6f51d1bcc89909d504ec9624d20eb349 (diff)
added sunrpc/sunrpc-xprtsock.stp
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--sunrpc/sunrpc-xprtsock.stp76
1 files changed, 76 insertions, 0 deletions
diff --git a/sunrpc/sunrpc-xprtsock.stp b/sunrpc/sunrpc-xprtsock.stp
new file mode 100644
index 0000000..8d560df
--- /dev/null
+++ b/sunrpc/sunrpc-xprtsock.stp
@@ -0,0 +1,76 @@
+%{
+#include <linux/kernel.h>
+#include <linux/sunrpc/clnt.h>
+#include <linux/sunrpc/svc.h>
+%}
+
+function task_status:long(_task:long)
+%{
+ struct rpc_task *task = (struct rpc_task *)(long) kread(&(THIS->_task));
+
+ THIS->__retvalue = task->tk_status;
+
+ CATCH_DEREF_FAULT();
+%}
+probe kernel.function("tcp_sendpage").return
+{
+ if ($return == -107) /* ENOTCONN */
+ printf("%s(%d): tcp_sendpage: return %d (%s)\n",
+ execname(), pid(), $return, errno_str($return));
+}
+probe module("sunrpc").function("xs_sendpages").return
+{
+ if ($return == -107) /* ENOTCONN */
+ printf("%s(%d): xs_sendpages: return %d (%s)\n",
+ execname(), pid(), $return, errno_str($return));
+}
+probe module("sunrpc").function("xs_send_kvec").return
+{
+ if ($return == -107) /* ENOTCONN */
+ printf("%s(%d): xs_send_kvec: return %d (%s)\n",
+ execname(), pid(), $return, errno_str($return));
+}
+/*
+probe module("sunrpc").function("xs_send_pagedata").return
+{
+ if ($return == -107)
+ printf("%s(%d): xs_send_pagedata: return %d (%s)\n",
+ execname(), pid(), $return, errno_str($return));
+}
+*/
+probe module("sunrpc").function("xs_tcp_send_request").return
+{
+ if ($return == -107) /* ENOTCONN */
+ printf("%s(%d): xs_tcp_send_request: return %d (%s)\n",
+ execname(), pid(), $return, errno_str($return));
+}
+global rpcb_task
+probe module("sunrpc").function("rpcb_getport_async")
+{
+ rpcb_task = $task
+}
+probe module("sunrpc").function("rpcb_getport_async").return
+{
+ if (task_status(rpcb_task))
+ printf("%s(%d): rpcb_getport_async: status %d\n",
+ execname(), pid(), task_status(rpcb_task));
+}
+probe module("sunrpc").function("rpcb_getport_done").return
+{
+ if (task_status($child))
+ printf("%s(%d): rpcb_getport_done: status %d\n",
+ execname(), pid(), task_status(rpcb_task));
+}
+global xstcp_task
+probe module("sunrpc").function("xs_tcp_connect")
+{
+ xstcp_task = $task
+}
+probe module("sunrpc").function("xs_tcp_connect").return
+{
+ if (task_status(xstcp_task))
+ printf("%s(%d): xs_tcp_connect: status %d\n",
+ execname(), pid(), task_status(rpcb_task));
+}
+probe begin { log("starting xprtsock probe") }
+probe end { log("ending xprtsock probe") }