diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-09-04 22:09:50 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-09-05 10:13:16 -0400 |
commit | 92cb6c5be8134db6f7c38f25f6afd13e444cebaf (patch) | |
tree | cbc1f2bb36bb6d9607a54efa2b03c0463eccc3b0 /include/trace/events/sunrpc.h | |
parent | 2f048db4680ae19da13df15d352ac02748781ecb (diff) |
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>
Diffstat (limited to 'include/trace/events/sunrpc.h')
-rw-r--r-- | include/trace/events/sunrpc.h | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index b74a8acd38fa..d51d16c7afd8 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h | |||
@@ -17,18 +17,20 @@ DECLARE_EVENT_CLASS(rpc_task_status, | |||
17 | TP_ARGS(task), | 17 | TP_ARGS(task), |
18 | 18 | ||
19 | TP_STRUCT__entry( | 19 | TP_STRUCT__entry( |
20 | __field(const struct rpc_task *, task) | 20 | __field(unsigned int, task_id) |
21 | __field(const struct rpc_clnt *, clnt) | 21 | __field(unsigned int, client_id) |
22 | __field(int, status) | 22 | __field(int, status) |
23 | ), | 23 | ), |
24 | 24 | ||
25 | TP_fast_assign( | 25 | TP_fast_assign( |
26 | __entry->task = task; | 26 | __entry->task_id = task->tk_pid; |
27 | __entry->clnt = task->tk_client; | 27 | __entry->client_id = task->tk_client->cl_clid; |
28 | __entry->status = task->tk_status; | 28 | __entry->status = task->tk_status; |
29 | ), | 29 | ), |
30 | 30 | ||
31 | TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) | 31 | TP_printk("task:%u@%u, status %d", |
32 | __entry->task_id, __entry->client_id, | ||
33 | __entry->status) | ||
32 | ); | 34 | ); |
33 | 35 | ||
34 | DEFINE_EVENT(rpc_task_status, rpc_call_status, | 36 | DEFINE_EVENT(rpc_task_status, rpc_call_status, |
@@ -49,18 +51,20 @@ TRACE_EVENT(rpc_connect_status, | |||
49 | TP_ARGS(task, status), | 51 | TP_ARGS(task, status), |
50 | 52 | ||
51 | TP_STRUCT__entry( | 53 | TP_STRUCT__entry( |
52 | __field(const struct rpc_task *, task) | 54 | __field(unsigned int, task_id) |
53 | __field(const struct rpc_clnt *, clnt) | 55 | __field(unsigned int, client_id) |
54 | __field(int, status) | 56 | __field(int, status) |
55 | ), | 57 | ), |
56 | 58 | ||
57 | TP_fast_assign( | 59 | TP_fast_assign( |
58 | __entry->task = task; | 60 | __entry->task_id = task->tk_pid; |
59 | __entry->clnt = task->tk_client; | 61 | __entry->client_id = task->tk_client->cl_clid; |
60 | __entry->status = status; | 62 | __entry->status = status; |
61 | ), | 63 | ), |
62 | 64 | ||
63 | TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) | 65 | TP_printk("task:%u@%u, status %d", |
66 | __entry->task_id, __entry->client_id, | ||
67 | __entry->status) | ||
64 | ); | 68 | ); |
65 | 69 | ||
66 | DECLARE_EVENT_CLASS(rpc_task_running, | 70 | DECLARE_EVENT_CLASS(rpc_task_running, |
@@ -70,8 +74,8 @@ DECLARE_EVENT_CLASS(rpc_task_running, | |||
70 | TP_ARGS(clnt, task, action), | 74 | TP_ARGS(clnt, task, action), |
71 | 75 | ||
72 | TP_STRUCT__entry( | 76 | TP_STRUCT__entry( |
73 | __field(const struct rpc_clnt *, clnt) | 77 | __field(unsigned int, task_id) |
74 | __field(const struct rpc_task *, task) | 78 | __field(unsigned int, client_id) |
75 | __field(const void *, action) | 79 | __field(const void *, action) |
76 | __field(unsigned long, runstate) | 80 | __field(unsigned long, runstate) |
77 | __field(int, status) | 81 | __field(int, status) |
@@ -79,17 +83,16 @@ DECLARE_EVENT_CLASS(rpc_task_running, | |||
79 | ), | 83 | ), |
80 | 84 | ||
81 | TP_fast_assign( | 85 | TP_fast_assign( |
82 | __entry->clnt = clnt; | 86 | __entry->client_id = clnt->cl_clid; |
83 | __entry->task = task; | 87 | __entry->task_id = task->tk_pid; |
84 | __entry->action = action; | 88 | __entry->action = action; |
85 | __entry->runstate = task->tk_runstate; | 89 | __entry->runstate = task->tk_runstate; |
86 | __entry->status = task->tk_status; | 90 | __entry->status = task->tk_status; |
87 | __entry->flags = task->tk_flags; | 91 | __entry->flags = task->tk_flags; |
88 | ), | 92 | ), |
89 | 93 | ||
90 | TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d action=%pf", | 94 | TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d action=%pf", |
91 | __entry->task, | 95 | __entry->task_id, __entry->client_id, |
92 | __entry->clnt, | ||
93 | __entry->flags, | 96 | __entry->flags, |
94 | __entry->runstate, | 97 | __entry->runstate, |
95 | __entry->status, | 98 | __entry->status, |
@@ -128,8 +131,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued, | |||
128 | TP_ARGS(clnt, task, q), | 131 | TP_ARGS(clnt, task, q), |
129 | 132 | ||
130 | TP_STRUCT__entry( | 133 | TP_STRUCT__entry( |
131 | __field(const struct rpc_clnt *, clnt) | 134 | __field(unsigned int, task_id) |
132 | __field(const struct rpc_task *, task) | 135 | __field(unsigned int, client_id) |
133 | __field(unsigned long, timeout) | 136 | __field(unsigned long, timeout) |
134 | __field(unsigned long, runstate) | 137 | __field(unsigned long, runstate) |
135 | __field(int, status) | 138 | __field(int, status) |
@@ -138,8 +141,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued, | |||
138 | ), | 141 | ), |
139 | 142 | ||
140 | TP_fast_assign( | 143 | TP_fast_assign( |
141 | __entry->clnt = clnt; | 144 | __entry->client_id = clnt->cl_clid; |
142 | __entry->task = task; | 145 | __entry->task_id = task->tk_pid; |
143 | __entry->timeout = task->tk_timeout; | 146 | __entry->timeout = task->tk_timeout; |
144 | __entry->runstate = task->tk_runstate; | 147 | __entry->runstate = task->tk_runstate; |
145 | __entry->status = task->tk_status; | 148 | __entry->status = task->tk_status; |
@@ -147,9 +150,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued, | |||
147 | __assign_str(q_name, rpc_qname(q)); | 150 | __assign_str(q_name, rpc_qname(q)); |
148 | ), | 151 | ), |
149 | 152 | ||
150 | TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s", | 153 | TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s", |
151 | __entry->task, | 154 | __entry->task_id, __entry->client_id, |
152 | __entry->clnt, | ||
153 | __entry->flags, | 155 | __entry->flags, |
154 | __entry->runstate, | 156 | __entry->runstate, |
155 | __entry->status, | 157 | __entry->status, |