SUNRPC: Replace pointer values with task->tk_pid and rpc_clnt->cl_clid

Instead of the pointer values, use the task and client identifier values
for tracing purposes.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust 2013-09-04 22:09:50 -04:00
parent 2f048db468
commit 92cb6c5be8
1 changed files with 26 additions and 24 deletions

View File

@ -17,18 +17,20 @@ DECLARE_EVENT_CLASS(rpc_task_status,
TP_ARGS(task), TP_ARGS(task),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(const struct rpc_task *, task) __field(unsigned int, task_id)
__field(const struct rpc_clnt *, clnt) __field(unsigned int, client_id)
__field(int, status) __field(int, status)
), ),
TP_fast_assign( TP_fast_assign(
__entry->task = task; __entry->task_id = task->tk_pid;
__entry->clnt = task->tk_client; __entry->client_id = task->tk_client->cl_clid;
__entry->status = task->tk_status; __entry->status = task->tk_status;
), ),
TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) TP_printk("task:%u@%u, status %d",
__entry->task_id, __entry->client_id,
__entry->status)
); );
DEFINE_EVENT(rpc_task_status, rpc_call_status, DEFINE_EVENT(rpc_task_status, rpc_call_status,
@ -49,18 +51,20 @@ TRACE_EVENT(rpc_connect_status,
TP_ARGS(task, status), TP_ARGS(task, status),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(const struct rpc_task *, task) __field(unsigned int, task_id)
__field(const struct rpc_clnt *, clnt) __field(unsigned int, client_id)
__field(int, status) __field(int, status)
), ),
TP_fast_assign( TP_fast_assign(
__entry->task = task; __entry->task_id = task->tk_pid;
__entry->clnt = task->tk_client; __entry->client_id = task->tk_client->cl_clid;
__entry->status = status; __entry->status = status;
), ),
TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) TP_printk("task:%u@%u, status %d",
__entry->task_id, __entry->client_id,
__entry->status)
); );
DECLARE_EVENT_CLASS(rpc_task_running, DECLARE_EVENT_CLASS(rpc_task_running,
@ -70,8 +74,8 @@ DECLARE_EVENT_CLASS(rpc_task_running,
TP_ARGS(clnt, task, action), TP_ARGS(clnt, task, action),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(const struct rpc_clnt *, clnt) __field(unsigned int, task_id)
__field(const struct rpc_task *, task) __field(unsigned int, client_id)
__field(const void *, action) __field(const void *, action)
__field(unsigned long, runstate) __field(unsigned long, runstate)
__field(int, status) __field(int, status)
@ -79,17 +83,16 @@ DECLARE_EVENT_CLASS(rpc_task_running,
), ),
TP_fast_assign( TP_fast_assign(
__entry->clnt = clnt; __entry->client_id = clnt->cl_clid;
__entry->task = task; __entry->task_id = task->tk_pid;
__entry->action = action; __entry->action = action;
__entry->runstate = task->tk_runstate; __entry->runstate = task->tk_runstate;
__entry->status = task->tk_status; __entry->status = task->tk_status;
__entry->flags = task->tk_flags; __entry->flags = task->tk_flags;
), ),
TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d action=%pf", TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d action=%pf",
__entry->task, __entry->task_id, __entry->client_id,
__entry->clnt,
__entry->flags, __entry->flags,
__entry->runstate, __entry->runstate,
__entry->status, __entry->status,
@ -128,8 +131,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued,
TP_ARGS(clnt, task, q), TP_ARGS(clnt, task, q),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(const struct rpc_clnt *, clnt) __field(unsigned int, task_id)
__field(const struct rpc_task *, task) __field(unsigned int, client_id)
__field(unsigned long, timeout) __field(unsigned long, timeout)
__field(unsigned long, runstate) __field(unsigned long, runstate)
__field(int, status) __field(int, status)
@ -138,8 +141,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued,
), ),
TP_fast_assign( TP_fast_assign(
__entry->clnt = clnt; __entry->client_id = clnt->cl_clid;
__entry->task = task; __entry->task_id = task->tk_pid;
__entry->timeout = task->tk_timeout; __entry->timeout = task->tk_timeout;
__entry->runstate = task->tk_runstate; __entry->runstate = task->tk_runstate;
__entry->status = task->tk_status; __entry->status = task->tk_status;
@ -147,9 +150,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued,
__assign_str(q_name, rpc_qname(q)); __assign_str(q_name, rpc_qname(q));
), ),
TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s", TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s",
__entry->task, __entry->task_id, __entry->client_id,
__entry->clnt,
__entry->flags, __entry->flags,
__entry->runstate, __entry->runstate,
__entry->status, __entry->status,