diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-modules/0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch | 186 |
1 files changed, 186 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch b/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch new file mode 100644 index 0000000000..089486f51b --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-Replace-pointer-values-with-task-tk_pid-and-rpc_.patch | |||
@@ -0,0 +1,186 @@ | |||
1 | From 89f0be35e1baf411df6852014013ac64ad1bbcf8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Jeanson <mjeanson@efficios.com> | ||
3 | Date: Wed, 9 Jan 2019 14:59:16 -0500 | ||
4 | Subject: [PATCH 6/9] Fix: Replace pointer values with task->tk_pid and | ||
5 | rpc_clnt->cl_clid | ||
6 | |||
7 | Introduced in v3.12. | ||
8 | |||
9 | See upstream commit : | ||
10 | |||
11 | commit 92cb6c5be8134db6f7c38f25f6afd13e444cebaf | ||
12 | Author: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
13 | Date: Wed Sep 4 22:09:50 2013 -0400 | ||
14 | |||
15 | SUNRPC: Replace pointer values with task->tk_pid and rpc_clnt->cl_clid | ||
16 | |||
17 | Instead of the pointer values, use the task and client identifier values | ||
18 | for tracing purposes. | ||
19 | |||
20 | Signed-off-by: Michael Jeanson <mjeanson@efficios.com> | ||
21 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
22 | |||
23 | Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/89f0be35e1baf411df6852014013ac64ad1bbcf8 | ||
24 | |||
25 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
26 | --- | ||
27 | instrumentation/events/lttng-module/rpc.h | 108 ++++++++++++++++++++-- | ||
28 | 1 file changed, 102 insertions(+), 6 deletions(-) | ||
29 | |||
30 | diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h | ||
31 | index b9e45fe..a4ac557 100644 | ||
32 | --- a/instrumentation/events/lttng-module/rpc.h | ||
33 | +++ b/instrumentation/events/lttng-module/rpc.h | ||
34 | @@ -8,6 +8,20 @@ | ||
35 | #include <linux/sunrpc/sched.h> | ||
36 | #include <linux/sunrpc/clnt.h> | ||
37 | |||
38 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | ||
39 | +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, | ||
40 | + | ||
41 | + TP_PROTO(struct rpc_task *task), | ||
42 | + | ||
43 | + TP_ARGS(task), | ||
44 | + | ||
45 | + TP_FIELDS( | ||
46 | + ctf_integer(unsigned int, task_id, task->tk_pid) | ||
47 | + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
48 | + ctf_integer(int, status, task->tk_status) | ||
49 | + ) | ||
50 | +) | ||
51 | +#else | ||
52 | LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, | ||
53 | |||
54 | TP_PROTO(struct rpc_task *task), | ||
55 | @@ -20,6 +34,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, | ||
56 | ctf_integer(int, status, task->tk_status) | ||
57 | ) | ||
58 | ) | ||
59 | +#endif | ||
60 | |||
61 | LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status, | ||
62 | TP_PROTO(struct rpc_task *task), | ||
63 | @@ -40,8 +55,8 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status, | ||
64 | TP_ARGS(task), | ||
65 | |||
66 | TP_FIELDS( | ||
67 | - ctf_integer_hex(const struct rpc_task *, task, task) | ||
68 | - ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) | ||
69 | + ctf_integer(unsigned int, task_id, task->tk_pid) | ||
70 | + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
71 | ctf_integer(int, status, task->tk_status) | ||
72 | ) | ||
73 | ) | ||
74 | @@ -53,8 +68,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, | ||
75 | TP_ARGS(task, action), | ||
76 | |||
77 | TP_FIELDS( | ||
78 | - ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) | ||
79 | - ctf_integer_hex(const struct rpc_task *, task, task) | ||
80 | + ctf_integer(unsigned int, task_id, task->tk_pid) | ||
81 | + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
82 | ctf_integer_hex(const void *, action, action) | ||
83 | ctf_integer(unsigned long, runstate, task->tk_runstate) | ||
84 | ctf_integer(int, status, task->tk_status) | ||
85 | @@ -90,8 +105,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, | ||
86 | TP_ARGS(task, q), | ||
87 | |||
88 | TP_FIELDS( | ||
89 | - ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) | ||
90 | - ctf_integer_hex(const struct rpc_task *, task, task) | ||
91 | + ctf_integer(unsigned int, task_id, task->tk_pid) | ||
92 | + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
93 | ctf_integer(unsigned long, timeout, task->tk_timeout) | ||
94 | ctf_integer(unsigned long, runstate, task->tk_runstate) | ||
95 | ctf_integer(int, status, task->tk_status) | ||
96 | @@ -114,6 +129,87 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, | ||
97 | TP_ARGS(task, q) | ||
98 | ) | ||
99 | |||
100 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | ||
101 | +LTTNG_TRACEPOINT_EVENT(rpc_connect_status, | ||
102 | + TP_PROTO(struct rpc_task *task, int status), | ||
103 | + | ||
104 | + TP_ARGS(task, status), | ||
105 | + | ||
106 | + TP_FIELDS( | ||
107 | + ctf_integer(unsigned int, task_id, task->tk_pid) | ||
108 | + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
109 | + ctf_integer(int, status, status) | ||
110 | + ) | ||
111 | +) | ||
112 | + | ||
113 | +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, | ||
114 | + | ||
115 | + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), | ||
116 | + | ||
117 | + TP_ARGS(clnt, task, action), | ||
118 | + | ||
119 | + TP_FIELDS( | ||
120 | + ctf_integer(unsigned int, task_id, task->tk_pid) | ||
121 | + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
122 | + ctf_integer_hex(const void *, action, action) | ||
123 | + ctf_integer(unsigned long, runstate, task->tk_runstate) | ||
124 | + ctf_integer(int, status, task->tk_status) | ||
125 | + ctf_integer(unsigned short, flags, task->tk_flags) | ||
126 | + ) | ||
127 | +) | ||
128 | + | ||
129 | +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin, | ||
130 | + | ||
131 | + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), | ||
132 | + | ||
133 | + TP_ARGS(clnt, task, action) | ||
134 | +) | ||
135 | + | ||
136 | +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action, | ||
137 | + | ||
138 | + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), | ||
139 | + | ||
140 | + TP_ARGS(clnt, task, action) | ||
141 | +) | ||
142 | + | ||
143 | +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete, | ||
144 | + | ||
145 | + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), | ||
146 | + | ||
147 | + TP_ARGS(clnt, task, action) | ||
148 | +) | ||
149 | + | ||
150 | +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, | ||
151 | + | ||
152 | + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), | ||
153 | + | ||
154 | + TP_ARGS(clnt, task, q), | ||
155 | + | ||
156 | + TP_FIELDS( | ||
157 | + ctf_integer(unsigned int, task_id, task->tk_pid) | ||
158 | + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
159 | + ctf_integer(unsigned long, timeout, task->tk_timeout) | ||
160 | + ctf_integer(unsigned long, runstate, task->tk_runstate) | ||
161 | + ctf_integer(int, status, task->tk_status) | ||
162 | + ctf_integer(unsigned short, flags, task->tk_flags) | ||
163 | + ctf_string(q_name, rpc_qname(q)) | ||
164 | + ) | ||
165 | +) | ||
166 | + | ||
167 | +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep, | ||
168 | + | ||
169 | + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), | ||
170 | + | ||
171 | + TP_ARGS(clnt, task, q) | ||
172 | +) | ||
173 | + | ||
174 | +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, | ||
175 | + | ||
176 | + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), | ||
177 | + | ||
178 | + TP_ARGS(clnt, task, q) | ||
179 | +) | ||
180 | + | ||
181 | #else | ||
182 | LTTNG_TRACEPOINT_EVENT(rpc_connect_status, | ||
183 | TP_PROTO(struct rpc_task *task, int status), | ||
184 | -- | ||
185 | 2.19.1 | ||
186 | |||