From: Michael Jeanson Date: Mon, 21 Nov 2022 17:14:57 +0000 (-0500) Subject: Drop support for kernels < 4.4 from rpc instrumentation X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=033520bec36ca3d3d46737141600dfed73760ab5;p=lttng-modules.git Drop support for kernels < 4.4 from rpc instrumentation Change-Id: I972d7b1397faacf901f43783fb0375a2e1c6a8f1 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/instrumentation/events/rpc.h b/include/instrumentation/events/rpc.h index 9c8c3218..ca448b36 100644 --- a/include/instrumentation/events/rpc.h +++ b/include/instrumentation/events/rpc.h @@ -12,7 +12,6 @@ #ifndef ONCE_LTTNG_RPC_H #define ONCE_LTTNG_RPC_H -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) static inline int lttng_get_clid(const struct rpc_task *task) { @@ -28,7 +27,6 @@ int lttng_get_clid(const struct rpc_task *task) */ return (int) tk_client->cl_clid; } -#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */ #endif /* ONCE_LTTNG_RPC_H */ @@ -58,7 +56,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status, TP_ARGS(task) ) -#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) +#else LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, TP_PROTO(struct rpc_task *task), @@ -78,31 +76,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status, 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, - - TP_PROTO(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_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), @@ -128,7 +101,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status, ctf_integer(int, status, task->tk_status) ) ) -#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) +#else LTTNG_TRACEPOINT_EVENT(rpc_connect_status, TP_PROTO(struct rpc_task *task, int status), @@ -140,18 +113,6 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status, 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 (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0)) @@ -223,7 +184,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, TP_ARGS(task, q) ) -#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) +#else LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), @@ -285,75 +246,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep, TP_ARGS(clnt, task, q) ) -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) -) - -#else -LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), - - TP_ARGS(clnt, task, action), - - TP_FIELDS( - ctf_integer_hex(const struct rpc_clnt *, clnt, clnt) - 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_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, - - 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, - - 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, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), - - TP_ARGS(clnt, task, q), - - TP_FIELDS( - ctf_integer_hex(const struct rpc_clnt *, clnt, clnt) - 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_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, TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),