Fix: sunrpc instrumentation for 4.17
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 17 Apr 2018 15:07:47 +0000 (11:07 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 1 May 2018 20:35:26 +0000 (16:35 -0400)
See upstream commit:

  commit e671edb9428c8a61662aaf8c39f5edced7cc45c7
  Author: Chuck Lever <chuck.lever@oracle.com>
  Date:   Fri Mar 16 10:33:44 2018 -0400

    sunrpc: Simplify synopsis of some trace points

    Clean up: struct rpc_task carries a pointer to a struct rpc_clnt,
    and in fact task->tk_client is always what is passed into trace
    points that are already passing @task.

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

index 29e0cd7b4e1faa035ad9109c1f236f90845143e5..b9e45fef88ebc5b8957cb824b162b34ed2411762 100644 (file)
@@ -33,6 +33,88 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
        TP_ARGS(task)
 )
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
+       TP_PROTO(const struct rpc_task *task),
+
+       TP_ARGS(task),
+
+       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, task->tk_status)
+       )
+)
+
+LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
+
+       TP_PROTO(const struct rpc_task *task, const void *action),
+
+       TP_ARGS(task, action),
+
+       TP_FIELDS(
+               ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
+               ctf_integer_hex(const struct rpc_task *, task, task)
+               ctf_integer_hex(const void *, action, action)
+               ctf_integer(unsigned long, runstate, task->tk_runstate)
+               ctf_integer(int, status, task->tk_status)
+               ctf_integer(unsigned short, flags, task->tk_flags)
+       )
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin,
+
+       TP_PROTO(const struct rpc_task *task, const void *action),
+
+       TP_ARGS(task, action)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action,
+
+       TP_PROTO(const struct rpc_task *task, const void *action),
+
+       TP_ARGS(task, action)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete,
+
+       TP_PROTO(const struct rpc_task *task, const void *action),
+
+       TP_ARGS(task, action)
+)
+
+LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
+
+       TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q),
+
+       TP_ARGS(task, q),
+
+       TP_FIELDS(
+               ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
+               ctf_integer_hex(const struct rpc_task *, task, task)
+               ctf_integer(unsigned long, timeout, task->tk_timeout)
+               ctf_integer(unsigned long, runstate, task->tk_runstate)
+               ctf_integer(int, status, task->tk_status)
+               ctf_integer(unsigned short, flags, task->tk_flags)
+               ctf_string(q_name, rpc_qname(q))
+       )
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep,
+
+       TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q),
+
+       TP_ARGS(task, q)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
+
+       TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q),
+
+       TP_ARGS(task, q)
+)
+
+#else
 LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
        TP_PROTO(struct rpc_task *task, int status),
 
@@ -66,7 +148,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin,
        TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
 
        TP_ARGS(clnt, task, action)
-
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action,
@@ -74,7 +155,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action,
        TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
 
        TP_ARGS(clnt, task, action)
-
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete,
@@ -82,7 +162,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete,
        TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
 
        TP_ARGS(clnt, task, action)
-
 )
 
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
@@ -107,7 +186,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep,
        TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
 
        TP_ARGS(clnt, task, q)
-
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
@@ -115,8 +193,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
        TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
 
        TP_ARGS(clnt, task, q)
-
 )
+#endif
 
 #endif /* LTTNG_TRACE_RPC_H */
 
This page took 0.026573 seconds and 4 git commands to generate.