X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Frpc.h;h=68c622c0c63e09d7192951d3c62d750ee99b42f5;hb=8f83a9103dcdf4f6b73783427fc5ded4869309d5;hp=1f47d6e4a5bb9496574b4f3a524bc7c2c23ff2a4;hpb=e2fdfe5345dd36a72d9a63d5a0bc66031a4751bf;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h index 1f47d6e4..68c622c0 100644 --- a/instrumentation/events/lttng-module/rpc.h +++ b/instrumentation/events/lttng-module/rpc.h @@ -9,7 +9,32 @@ #include #include -#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), @@ -70,7 +139,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, TP_FIELDS( ctf_integer(unsigned int, task_id, task->tk_pid) - ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) + ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1) ctf_integer_hex(const void *, action, action) ctf_integer(unsigned long, runstate, task->tk_runstate) ctf_integer(int, status, task->tk_status) @@ -107,7 +176,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, TP_FIELDS( ctf_integer(unsigned int, task_id, task->tk_pid) - ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) + ctf_integer(unsigned int, client_id, task->tk_client ? + task->tk_client->cl_clid : -1) ctf_integer(unsigned long, timeout, task->tk_timeout) ctf_integer(unsigned long, runstate, task->tk_runstate) ctf_integer(int, status, task->tk_status) @@ -131,18 +201,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), @@ -151,7 +209,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, TP_FIELDS( ctf_integer(unsigned int, task_id, task->tk_pid) - ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) + ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1) ctf_integer_hex(const void *, action, action) ctf_integer(unsigned long, runstate, task->tk_runstate) ctf_integer(int, status, task->tk_status) @@ -212,18 +270,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),