summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2011-06-01 15:31:34 -0400
committerSteve Dickson <steved@redhat.com>2011-06-01 15:31:34 -0400
commita285d06fe0387b0b20d1f672dce1ecf94cf82692 (patch)
treeb43fc9f0aac2bcc8f4f397214249167a4891698a
parent178b38cbd6e97e5d70cb58f32bf5853e73af4cf5 (diff)
downloadsystemtap-a285d06fe0387b0b20d1f672dce1ecf94cf82692.tar.gz
systemtap-a285d06fe0387b0b20d1f672dce1ecf94cf82692.tar.xz
systemtap-a285d06fe0387b0b20d1f672dce1ecf94cf82692.zip
Fixed a few bugs
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--sunrpc/call_status.stp45
-rw-r--r--tapset/task.stp5
2 files changed, 36 insertions, 14 deletions
diff --git a/sunrpc/call_status.stp b/sunrpc/call_status.stp
index f0be7bb..45119f5 100644
--- a/sunrpc/call_status.stp
+++ b/sunrpc/call_status.stp
@@ -16,7 +16,8 @@ probe module("sunrpc").function("call_transmit_status").return
{
terror = task_status(ctask);
if (terror && terror != -11)
- printf("call_transmit_status:%s:%s: error %d (%s)\n",
+ printf("call_transmit_status:%s(%d):%s:%s: error %d (%s)\n",
+ execname(), pid(),
cl_server(ctask), cl_prog(ctask), terror, errno_str(terror));
}
probe module("sunrpc").function("rpcb_getport_async")
@@ -26,33 +27,54 @@ probe module("sunrpc").function("rpcb_getport_async")
probe module("sunrpc").function("rpcb_getport_async")
{
terror = task_status(ctask);
+ /*
if (terror && terror != -11)
+ */
printf("rpcb_getport_async:%s:%s:error %d (%s)\n",
cl_server(ctask), cl_prog(ctask), terror, errno_str(terror));
}
+probe module("sunrpc").function("call_bind")
+{
+ terror = task_status($task);
+ /*
+ if (terror && terror != -11)
+ */
+ printf("call_bind:%s(%d):%s:%s: task %p error %d (%s)\n",
+ execname(), pid(),
+ cl_server($task), cl_prog($task), $task, terror, errno_str(terror));
+}
+probe module("sunrpc").function("call_status")
+{
+ terror = task_status($task);
+ if (terror && terror != -11)
+ printf("call_status:%s(%d): %s:%s: task %p error %d (%s)\n",
+ execname(), pid(),
+ cl_server($task), cl_prog($task), $task, terror, errno_str(terror));
+}
probe module("sunrpc").function("call_bind_status")
{
terror = task_status($task);
if (terror && terror != -11)
- printf("call_bind_status:%s:%s:error %d (%s)\n",
+ printf("call_bind_status:%s(%d):%s:%s:error %d (%s)\n",
+ execname(), pid(),
cl_server($task), cl_prog($task), terror, errno_str(terror));
}
probe module("sunrpc").function("call_connect_status")
{
- ctask = $task;
-}
-probe module("sunrpc").function("call_connect_status").return
-{
- terror = task_status(ctask);
+ terror = task_status($task);
+ /*
if (terror && terror != -11)
- printf("call_connect_status:%s:%s:error %d (%s)\n",
- cl_server(ctask), cl_prog(ctask), terror, errno_str(terror));
+ */
+ printf("call_connect_status:%s(%d):%s:%s:error %d (%s)\n",
+ execname(), pid(),
+ cl_server($task), cl_prog($task), terror, errno_str(terror));
}
probe module("sunrpc").function("call_bind_status")
{
terror = task_status($task);
if (terror && terror != -11)
- printf("call_bind_status:%s:%s: error %d (%s)\n",
+ printf("call_bind_status:%s(%d): %s:%s: error %d (%s)\n",
+ execname(), pid(),
cl_server($task), cl_prog($task), terror, errno_str(terror));
}
probe module("sunrpc").function("call_transmit")
@@ -60,7 +82,8 @@ probe module("sunrpc").function("call_transmit")
transmit = $task;
terror = task_status($task);
if (terror && terror != -11)
- printf("call_transmit:%s:%s: error %d (%s)\n",
+ printf("call_transmit:%s(%d):%s:%s: error %d (%s)\n",
+ execname(), pid(),
cl_server($task), cl_prog($task), terror, errno_str(terror));
}
probe module("sunrpc").function("call_transmit").return
diff --git a/tapset/task.stp b/tapset/task.stp
index 0d927ca..9a635ca 100644
--- a/tapset/task.stp
+++ b/tapset/task.stp
@@ -24,7 +24,7 @@ function task_dump:string(_task:long)
%}
function xprt_dump:string(_task:long)
%{
- struct rpc_task *task;
+ struct rpc_task *task = (struct rpc_task *)(long) kread(&(THIS->_task));
struct rpc_rqst *req;
struct rpc_xprt *xprt;
char buf[64];
@@ -44,8 +44,7 @@ function xprt_dump:string(_task:long)
sprintf(buf+cc, "xprt is NULL");
goto leave;
}
- sprintf(buf+cc, ": xprt 0x%p ops 0x%p state 0x%lx",
- xprt, xprt->ops, xprt->state);
+ sprintf(buf+cc, ": xprt 0x%p state 0x%lx", xprt, xprt->state);
cc = strlen(buf);
leave:
snprintf(THIS->__retvalue, 64, "%s", buf);