diff options
author | Steve Dickson <steved@redhat.com> | 2011-05-29 14:51:37 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2011-05-29 14:51:37 -0400 |
commit | 5d282eec7e97305b6735e84643fdb660fc92de93 (patch) | |
tree | b98b053f46948d61bbc1b15cdb020e8d2f6d3038 /tapset | |
parent | efb5e22eb4732a20b1b9fe909be89348aa59ae19 (diff) | |
download | systemtap-5d282eec7e97305b6735e84643fdb660fc92de93.tar.gz systemtap-5d282eec7e97305b6735e84643fdb660fc92de93.tar.xz systemtap-5d282eec7e97305b6735e84643fdb660fc92de93.zip |
Worked on some the the xprt routines.
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/task.stp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/tapset/task.stp b/tapset/task.stp index 6b121be..1500a4d 100644 --- a/tapset/task.stp +++ b/tapset/task.stp @@ -8,17 +8,36 @@ function task_dump:string(_task:long) %{ struct rpc_task *task = (struct rpc_task *)(long) kread(&(THIS->_task)); - char buf[MAXSTRINGLEN]; + char buf[64]; int cc=0; if (task <= 0) { sprintf(buf+cc, "task NULL"); } else { - sprintf(buf+cc, "task %p tk_pid %d tk_status %d\n", + sprintf(buf+cc, ": task 0x%p tk_pid %d tk_status %d", task, task->tk_pid, task->tk_status); cc = strlen(buf); } - snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf); + snprintf(THIS->__retvalue, 64, "%s", buf); + + CATCH_DEREF_FAULT(); +%} +function xprt_dump:string(_task:long) +%{ + struct rpc_task *task = (struct rpc_task *)(long) kread(&(THIS->_task)); + struct rpc_rqst *req = (struct rpc_rqst *)(long) kread(&(task->tk_rqstp)); + struct rpc_xprt *xprt = (struct rpc_xprt *)(long) kread(&(req->rq_xprt)); + char buf[64]; + int cc=0; + + if (task <= 0) { + sprintf(buf+cc, "task NULL"); + } else { + sprintf(buf+cc, ": xprt 0x%p ops 0x%p", + xprt, xprt->ops); + cc = strlen(buf); + } + snprintf(THIS->__retvalue, 64, "%s", buf); CATCH_DEREF_FAULT(); %} |