Commit 92cb6c5b authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 2f048db4
...@@ -17,18 +17,20 @@ DECLARE_EVENT_CLASS(rpc_task_status, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment