Fix: SUNRPC: Simplify defining common RPC trace events (v5.0)
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 9 Jan 2019 19:59:17 +0000 (14:59 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 16 Jan 2019 20:35:15 +0000 (15:35 -0500)
See upstream commit :

  commit dc5820bd21d84ee34770b0a1e2fca9378f8f7456
  Author: Chuck Lever <chuck.lever@oracle.com>
  Date:   Wed Dec 19 11:00:16 2018 -0500

    SUNRPC: Simplify defining common RPC trace events

    Clean up, no functional change is expected.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/rpc.h

index 1f47d6e4a5bb9496574b4f3a524bc7c2c23ff2a4..3798e8efd9da54fe71df2785e7bd9bbe3d8a2931 100644 (file)
@@ -9,7 +9,32 @@
 #include <linux/sunrpc/sched.h>
 #include <linux/sunrpc/clnt.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
+
+       TP_PROTO(const struct rpc_task *task),
+
+       TP_ARGS(task),
+
+       TP_FIELDS(
+               ctf_integer(unsigned int, task_id, task->tk_pid)
+               ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
+               ctf_integer(int, status, task->tk_status)
+       )
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status,
+       TP_PROTO(const struct rpc_task *task),
+
+       TP_ARGS(task)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
+       TP_PROTO(const struct rpc_task *task),
+
+       TP_ARGS(task)
+)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
 
        TP_PROTO(struct rpc_task *task),
@@ -22,6 +47,18 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
                ctf_integer(int, status, task->tk_status)
        )
 )
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status,
+       TP_PROTO(struct rpc_task *task),
+
+       TP_ARGS(task)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
+       TP_PROTO(struct rpc_task *task),
+
+       TP_ARGS(task)
+)
 #else
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
 
@@ -35,7 +72,6 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
                ctf_integer(int, status, task->tk_status)
        )
 )
-#endif
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status,
        TP_PROTO(struct rpc_task *task),
@@ -48,8 +84,15 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
 
        TP_ARGS(task)
 )
+#endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_connect_status,
+       TP_PROTO(const struct rpc_task *task),
+
+       TP_ARGS(task)
+)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
 LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
        TP_PROTO(const struct rpc_task *task),
 
@@ -61,7 +104,33 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
                ctf_integer(int, status, task->tk_status)
        )
 )
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
+       TP_PROTO(struct rpc_task *task, int status),
+
+       TP_ARGS(task, status),
+
+       TP_FIELDS(
+               ctf_integer(unsigned int, task_id, task->tk_pid)
+               ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
+               ctf_integer(int, status, status)
+       )
+)
+#else
+LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
+       TP_PROTO(struct rpc_task *task, int status),
+
+       TP_ARGS(task, status),
+
+       TP_FIELDS(
+               ctf_integer_hex(const struct rpc_task *, task, task)
+               ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
+               ctf_integer(int, status, status)
+       )
+)
+#endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
 
        TP_PROTO(const struct rpc_task *task, const void *action),
@@ -131,18 +200,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
 )
 
 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
-LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
-       TP_PROTO(struct rpc_task *task, int status),
-
-       TP_ARGS(task, status),
-
-       TP_FIELDS(
-               ctf_integer(unsigned int, task_id, task->tk_pid)
-               ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
-               ctf_integer(int, status, status)
-       )
-)
-
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
 
        TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
@@ -212,18 +269,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
 )
 
 #else
-LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
-       TP_PROTO(struct rpc_task *task, int status),
-
-       TP_ARGS(task, status),
-
-       TP_FIELDS(
-               ctf_integer_hex(const struct rpc_task *, task, task)
-               ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
-               ctf_integer(int, status, status)
-       )
-)
-
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
 
        TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
This page took 0.028145 seconds and 4 git commands to generate.