diff options
author | Steve Dickson <steved@redhat.com> | 2011-06-01 11:44:33 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2011-06-01 11:44:33 -0400 |
commit | 05d992ab6c54a025d8c7c6f441579e5c55ab2288 (patch) | |
tree | 373bdedbbc23cfe7286bf09afe25134e181412b1 | |
parent | eb465e7878bcb56b29de3d35c20d376766648951 (diff) | |
download | systemtap-05d992ab6c54a025d8c7c6f441579e5c55ab2288.tar.gz systemtap-05d992ab6c54a025d8c7c6f441579e5c55ab2288.tar.xz systemtap-05d992ab6c54a025d8c7c6f441579e5c55ab2288.zip |
Added task_flag()
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | sunrpc/call_status.stp | 26 | ||||
-rw-r--r-- | tapset/task.stp | 17 |
2 files changed, 38 insertions, 5 deletions
diff --git a/sunrpc/call_status.stp b/sunrpc/call_status.stp index 2befbb8..f0be7bb 100644 --- a/sunrpc/call_status.stp +++ b/sunrpc/call_status.stp @@ -16,9 +16,27 @@ probe module("sunrpc").function("call_transmit_status").return { terror = task_status(ctask); if (terror && terror != -11) - printf("call_connect:%s:%s: error %d (%s)\n", + printf("call_transmit_status:%s:%s: error %d (%s)\n", cl_server(ctask), cl_prog(ctask), terror, errno_str(terror)); } +probe module("sunrpc").function("rpcb_getport_async") +{ + ctask = $task; +} +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_status") +{ + terror = task_status($task); + if (terror && terror != -11) + printf("call_bind_status:%s:%s:error %d (%s)\n", + cl_server($task), cl_prog($task), terror, errno_str(terror)); +} probe module("sunrpc").function("call_connect_status") { ctask = $task; @@ -27,7 +45,7 @@ probe module("sunrpc").function("call_connect_status").return { terror = task_status(ctask); if (terror && terror != -11) - printf("call_connect_status:%s:%s: error %d (%s)\n", + printf("call_connect_status:%s:%s:error %d (%s)\n", cl_server(ctask), cl_prog(ctask), terror, errno_str(terror)); } probe module("sunrpc").function("call_bind_status") @@ -42,14 +60,14 @@ probe module("sunrpc").function("call_transmit") transmit = $task; terror = task_status($task); if (terror && terror != -11) - printf("call_connect_status:%s:%s: error %d (%s)\n", + printf("call_transmit:%s:%s: error %d (%s)\n", cl_server($task), cl_prog($task), terror, errno_str(terror)); } probe module("sunrpc").function("call_transmit").return { terror = task_status(transmit); if (terror && terror != -11) - printf("call_connect_status:%s:%s: error %d (%s)\n", + printf("call_transmit:%s:%s: error %d (%s)\n", cl_server(transmit), cl_prog(transmit), terror, errno_str(terror)); } /* diff --git a/tapset/task.stp b/tapset/task.stp index f9390db..04b1ece 100644 --- a/tapset/task.stp +++ b/tapset/task.stp @@ -44,7 +44,8 @@ function xprt_dump:string(_task:long) sprintf(buf+cc, "xprt is NULL"); goto leave; } - sprintf(buf+cc, ": xprt 0x%p ops 0x%p", xprt, xprt->ops); + sprintf(buf+cc, ": xprt 0x%p ops 0x%p state 0x%x", + xprt, xprt->ops, xprt->state); cc = strlen(buf); leave: snprintf(THIS->__retvalue, 64, "%s", buf); @@ -59,6 +60,20 @@ function task_status:long(_task:long) CATCH_DEREF_FAULT(); %} +function task_flags:string(_task:long) +%{ + struct rpc_task *task = (struct rpc_task *)(long) kread(&(THIS->_task)); + char buf[64]; + int cc=0; + + if (task->tk_flags & RPC_TASK_ASYNC) { + snprintf(buf+cc, 64, "ASYNC"); + cc = strlen(buf); + } + snprintf(THIS->__retvalue, 64, "%s", buf); + + CATCH_DEREF_FAULT(); +%} function cl_prognum:long(_task:long) %{ |