From ce804b949c8900667ffd046a00f9cdcb0d3a9fa1 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 13 Apr 2020 16:28:50 -0400 Subject: [PATCH] instrumentation: rcu: remove compatibility code --- instrumentation/events/lttng-module/rcu.h | 521 +--------------------- 1 file changed, 1 insertion(+), 520 deletions(-) diff --git a/instrumentation/events/lttng-module/rcu.h b/instrumentation/events/lttng-module/rcu.h index 73b2262c..be4a074c 100644 --- a/instrumentation/events/lttng-module/rcu.h +++ b/instrumentation/events/lttng-module/rcu.h @@ -6,7 +6,6 @@ #define LTTNG_TRACE_RCU_H #include -#include /* * Tracepoint for start/end markers used for utilization calculations. @@ -21,11 +20,7 @@ */ LTTNG_TRACEPOINT_EVENT(rcu_utilization, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) TP_PROTO(const char *s), -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ - TP_PROTO(char *s), -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ TP_ARGS(s), @@ -36,10 +31,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_utilization, #ifdef CONFIG_RCU_TRACE -#if defined(CONFIG_TREE_RCU) \ - || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) \ - && defined(CONFIG_PREEMPT_RCU)) \ - || defined(CONFIG_TREE_PREEMPT_RCU) +#if defined(CONFIG_TREE_RCU) /* * Tracepoint for grace-period events: starting and ending a grace @@ -50,8 +42,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_utilization, * and "cpuofl", respectively), and a CPU being kicked for being too * long in dyntick-idle mode ("kick"). */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \ - LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(rcu_grace_period, TP_PROTO(const char *rcuname, unsigned long gp_seq, const char *gpevent), @@ -64,33 +54,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_grace_period, ctf_string(gpevent, gpevent) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_grace_period, - - TP_PROTO(const char *rcuname, unsigned long gpnum, const char *gpevent), - - TP_ARGS(rcuname, gpnum, gpevent), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_string(gpevent, gpevent) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_grace_period, - - TP_PROTO(char *rcuname, unsigned long gpnum, char *gpevent), - - TP_ARGS(rcuname, gpnum, gpevent), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_string(gpevent, gpevent) - ) -) -#endif /* * Tracepoint for grace-period-initialization events. These are @@ -99,8 +62,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_grace_period, * rcu_node structure, and the mask of CPUs that will be waited for. * All but the type of RCU are extracted from the rcu_node structure. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \ - LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init, TP_PROTO(const char *rcuname, unsigned long gp_seq, u8 level, @@ -117,41 +78,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init, ctf_integer(unsigned long, qsmask, qsmask) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init, - - TP_PROTO(const char *rcuname, unsigned long gpnum, u8 level, - int grplo, int grphi, unsigned long qsmask), - - TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(u8, level, level) - ctf_integer(int, grplo, grplo) - ctf_integer(int, grphi, grphi) - ctf_integer(unsigned long, qsmask, qsmask) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init, - - TP_PROTO(char *rcuname, unsigned long gpnum, u8 level, - int grplo, int grphi, unsigned long qsmask), - - TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(u8, level, level) - ctf_integer(int, grplo, grplo) - ctf_integer(int, grphi, grphi) - ctf_integer(unsigned long, qsmask, qsmask) - ) -) -#endif /* * Tracepoint for tasks blocking within preemptible-RCU read-side @@ -159,8 +85,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init, * include SRCU), the grace-period number that the task is blocking * (the current or the next), and the task's PID. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \ - LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(rcu_preempt_task, TP_PROTO(const char *rcuname, int pid, unsigned long gp_seq), @@ -173,41 +97,12 @@ LTTNG_TRACEPOINT_EVENT(rcu_preempt_task, ctf_integer(int, pid, pid) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_preempt_task, - - TP_PROTO(const char *rcuname, int pid, unsigned long gpnum), - - TP_ARGS(rcuname, pid, gpnum), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(int, pid, pid) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_preempt_task, - - TP_PROTO(char *rcuname, int pid, unsigned long gpnum), - - TP_ARGS(rcuname, pid, gpnum), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(int, pid, pid) - ) -) -#endif /* * Tracepoint for tasks that blocked within a given preemptible-RCU * read-side critical section exiting that critical section. Track the * type of RCU (which one day might include SRCU) and the task's PID. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \ - LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task, TP_PROTO(const char *rcuname, unsigned long gp_seq, int pid), @@ -220,33 +115,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task, ctf_integer(int, pid, pid) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task, - - TP_PROTO(const char *rcuname, unsigned long gpnum, int pid), - - TP_ARGS(rcuname, gpnum, pid), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(int, pid, pid) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task, - - TP_PROTO(char *rcuname, unsigned long gpnum, int pid), - - TP_ARGS(rcuname, gpnum, pid), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(int, pid, pid) - ) -) -#endif /* * Tracepoint for quiescent-state-reporting events. These are @@ -256,8 +124,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task, * whether there are any blocked tasks blocking the current grace period. * All but the type of RCU are extracted from the rcu_node structure. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \ - LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report, TP_PROTO(const char *rcuname, unsigned long gp_seq, @@ -277,47 +143,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report, ctf_integer(u8, gp_tasks, gp_tasks) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report, - - TP_PROTO(const char *rcuname, unsigned long gpnum, - unsigned long mask, unsigned long qsmask, - u8 level, int grplo, int grphi, int gp_tasks), - - TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(unsigned long, mask, mask) - ctf_integer(unsigned long, qsmask, qsmask) - ctf_integer(u8, level, level) - ctf_integer(int, grplo, grplo) - ctf_integer(int, grphi, grphi) - ctf_integer(u8, gp_tasks, gp_tasks) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report, - - TP_PROTO(char *rcuname, unsigned long gpnum, - unsigned long mask, unsigned long qsmask, - u8 level, int grplo, int grphi, int gp_tasks), - - TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(unsigned long, mask, mask) - ctf_integer(unsigned long, qsmask, qsmask) - ctf_integer(u8, level, level) - ctf_integer(int, grplo, grplo) - ctf_integer(int, grphi, grphi) - ctf_integer(u8, gp_tasks, gp_tasks) - ) -) -#endif /* * Tracepoint for quiescent states detected by force_quiescent_state(). @@ -327,8 +152,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report, * or "kick" when kicking a CPU that has been in dyntick-idle mode for * too long. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \ - LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(rcu_fqs, TP_PROTO(const char *rcuname, unsigned long gp_seq, int cpu, const char *qsevent), @@ -342,43 +165,9 @@ LTTNG_TRACEPOINT_EVENT(rcu_fqs, ctf_string(qsevent, qsevent) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_fqs, - - TP_PROTO(const char *rcuname, unsigned long gpnum, int cpu, const char *qsevent), - - TP_ARGS(rcuname, gpnum, cpu, qsevent), - TP_FIELDS( - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(int, cpu, cpu) - ctf_string(rcuname, rcuname) - ctf_string(qsevent, qsevent) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_fqs, - - TP_PROTO(char *rcuname, unsigned long gpnum, int cpu, char *qsevent), - - TP_ARGS(rcuname, gpnum, cpu, qsevent), - - TP_FIELDS( - ctf_integer(unsigned long, gpnum, gpnum) - ctf_integer(int, cpu, cpu) - ctf_string(rcuname, rcuname) - ctf_string(qsevent, qsevent) - ) -) #endif -#endif /* - * #if defined(CONFIG_TREE_RCU) - * || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) - * && defined(CONFIG_PREEMPT_RCU)) - * || defined(CONFIG_TREE_PREEMPT_RCU) - */ - /* * Tracepoint for dyntick-idle entry/exit events. These take a string * as argument: "Start" for entering dyntick-idle mode, "End" for @@ -392,9 +181,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_fqs, * events use the upper bits of each number, while interrupt-related * events use the lower bits. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) \ - || LTTNG_KERNEL_RANGE(5,5,6, 5,6,0) \ - || LTTNG_KERNEL_RANGE(5,4,22, 5,5,0) LTTNG_TRACEPOINT_EVENT(rcu_dyntick, TP_PROTO(const char *polarity, long oldnesting, long newnesting, int dynticks), @@ -409,62 +195,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_dyntick, ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0)) -LTTNG_TRACEPOINT_EVENT(rcu_dyntick, - - TP_PROTO(const char *polarity, long oldnesting, long newnesting, atomic_t dynticks), - - TP_ARGS(polarity, oldnesting, newnesting, dynticks), - - TP_FIELDS( - ctf_string(polarity, polarity) - ctf_integer(long, oldnesting, oldnesting) - ctf_integer(long, newnesting, newnesting) - ctf_integer(int, dynticks, atomic_read(&dynticks)) - ) -) - -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_dyntick, - - TP_PROTO(const char *polarity, long long oldnesting, long long newnesting), - - TP_ARGS(polarity, oldnesting, newnesting), - - TP_FIELDS( - ctf_string(polarity, polarity) - ctf_integer(long long, oldnesting, oldnesting) - ctf_integer(long long, newnesting, newnesting) - ) -) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) -LTTNG_TRACEPOINT_EVENT(rcu_dyntick, - - TP_PROTO(char *polarity, long long oldnesting, long long newnesting), - - TP_ARGS(polarity, oldnesting, newnesting), - - TP_FIELDS( - ctf_string(polarity, polarity) - ctf_integer(long long, oldnesting, oldnesting) - ctf_integer(long long, newnesting, newnesting) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_dyntick, - - TP_PROTO(char *polarity), - - TP_ARGS(polarity), - - TP_FIELDS( - ctf_string(polarity, polarity) - ) -) -#endif - - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) /* * Tracepoint for RCU preparation for idle, the goal being to get RCU * processing done so that the current CPU can shut off its scheduling @@ -489,11 +219,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_dyntick, */ LTTNG_TRACEPOINT_EVENT(rcu_prep_idle, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) TP_PROTO(const char *reason), -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ - TP_PROTO(char *reason), -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ TP_ARGS(reason), @@ -501,7 +227,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_prep_idle, ctf_string(reason, reason) ) ) -#endif /* * Tracepoint for the registration of a single RCU callback function. @@ -510,7 +235,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_prep_idle, * number of lazy callbacks queued, and the fourth element is the * total number of callbacks queued. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) LTTNG_TRACEPOINT_EVENT(rcu_callback, TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen), @@ -524,54 +248,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_callback, ctf_integer(long, qlen, qlen) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_callback, - - TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen_lazy, - long qlen), - - TP_ARGS(rcuname, rhp, qlen_lazy, qlen), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer_hex(void *, rhp, rhp) - ctf_integer_hex(void *, func, rhp->func) - ctf_integer(long, qlen_lazy, qlen_lazy) - ctf_integer(long, qlen, qlen) - ) -) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -LTTNG_TRACEPOINT_EVENT(rcu_callback, - - TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen_lazy, - long qlen), - - TP_ARGS(rcuname, rhp, qlen_lazy, qlen), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer_hex(void *, rhp, rhp) - ctf_integer_hex(void *, func, rhp->func) - ctf_integer(long, qlen_lazy, qlen_lazy) - ctf_integer(long, qlen, qlen) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_callback, - - TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen), - - TP_ARGS(rcuname, rhp, qlen), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer_hex(void *, rhp, rhp) - ctf_integer_hex(void *, func, rhp->func) - ctf_integer(long, qlen, qlen) - ) -) -#endif - /* * Tracepoint for the registration of a single RCU callback of the special @@ -581,7 +257,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_callback, * the fourth argument is the number of lazy callbacks queued, and the * fifth argument is the total number of callbacks queued. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset, @@ -596,54 +271,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, ctf_integer(long, qlen, qlen) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, - - TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset, - long qlen_lazy, long qlen), - - TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer_hex(void *, rhp, rhp) - ctf_integer_hex(unsigned long, offset, offset) - ctf_integer(long, qlen_lazy, qlen_lazy) - ctf_integer(long, qlen, qlen) - ) -) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, - - TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, - long qlen_lazy, long qlen), - - TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer_hex(void *, rhp, rhp) - ctf_integer_hex(unsigned long, offset, offset) - ctf_integer(long, qlen_lazy, qlen_lazy) - ctf_integer(long, qlen, qlen) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, - - TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, - long qlen), - - TP_ARGS(rcuname, rhp, offset, qlen), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer_hex(void *, rhp, rhp) - ctf_integer_hex(unsigned long, offset, offset) - ctf_integer(long, qlen, qlen) - ) -) -#endif /* * Tracepoint for marking the beginning rcu_do_batch, performed to start @@ -652,7 +279,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, * the total number of callbacks queued, and the fourth argument is * the current RCU-callback batch limit. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) LTTNG_TRACEPOINT_EVENT(rcu_batch_start, TP_PROTO(const char *rcuname, long qlen, long blimit), @@ -665,62 +291,6 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_start, ctf_integer(long, blimit, blimit) ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) -LTTNG_TRACEPOINT_EVENT(rcu_batch_start, - - TP_PROTO(const char *rcuname, long qlen_lazy, long qlen, long blimit), - - TP_ARGS(rcuname, qlen_lazy, qlen, blimit), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(long, qlen_lazy, qlen_lazy) - ctf_integer(long, qlen, qlen) - ctf_integer(long, blimit, blimit) - ) -) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) -LTTNG_TRACEPOINT_EVENT(rcu_batch_start, - - TP_PROTO(char *rcuname, long qlen_lazy, long qlen, long blimit), - - TP_ARGS(rcuname, qlen_lazy, qlen, blimit), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(long, qlen_lazy, qlen_lazy) - ctf_integer(long, qlen, qlen) - ctf_integer(long, blimit, blimit) - ) -) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -LTTNG_TRACEPOINT_EVENT(rcu_batch_start, - - TP_PROTO(char *rcuname, long qlen_lazy, long qlen, int blimit), - - TP_ARGS(rcuname, qlen_lazy, qlen, blimit), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(long, qlen_lazy, qlen_lazy) - ctf_integer(long, qlen, qlen) - ctf_integer(int, blimit, blimit) - ) -) -#else -LTTNG_TRACEPOINT_EVENT(rcu_batch_start, - - TP_PROTO(char *rcuname, long qlen, int blimit), - - TP_ARGS(rcuname, qlen, blimit), - - TP_FIELDS( - ctf_string(rcuname, rcuname) - ctf_integer(long, qlen, qlen) - ctf_integer(int, blimit, blimit) - ) -) -#endif /* * Tracepoint for the invocation of a single RCU callback function. @@ -729,11 +299,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_start, */ LTTNG_TRACEPOINT_EVENT(rcu_invoke_callback, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) TP_PROTO(const char *rcuname, struct rcu_head *rhp), -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ - TP_PROTO(char *rcuname, struct rcu_head *rhp), -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ TP_ARGS(rcuname, rhp), @@ -753,11 +319,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_invoke_callback, */ LTTNG_TRACEPOINT_EVENT(rcu_invoke_kfree_callback, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset), -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ - TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset), -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ TP_ARGS(rcuname, rhp, offset), @@ -781,45 +343,21 @@ LTTNG_TRACEPOINT_EVENT(rcu_invoke_kfree_callback, */ LTTNG_TRACEPOINT_EVENT(rcu_batch_end, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)) TP_PROTO(const char *rcuname, int callbacks_invoked, char cb, char nr, char iit, char risk), TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) - TP_PROTO(const char *rcuname, int callbacks_invoked, - bool cb, bool nr, bool iit, bool risk), - - TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - TP_PROTO(char *rcuname, int callbacks_invoked, - bool cb, bool nr, bool iit, bool risk), - - TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), -#else - TP_PROTO(char *rcuname, int callbacks_invoked), - - TP_ARGS(rcuname, callbacks_invoked), -#endif TP_FIELDS( ctf_string(rcuname, rcuname) ctf_integer(int, callbacks_invoked, callbacks_invoked) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)) ctf_integer(char, cb, cb) ctf_integer(char, nr, nr) ctf_integer(char, iit, iit) ctf_integer(char, risk, risk) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - ctf_integer(bool, cb, cb) - ctf_integer(bool, nr, nr) - ctf_integer(bool, iit, iit) - ctf_integer(bool, risk, risk) -#endif ) ) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) /* * Tracepoint for rcutorture readers. The first argument is the name * of the RCU flavor from rcutorture's viewpoint and the second argument @@ -827,35 +365,20 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_end, */ LTTNG_TRACEPOINT_EVENT(rcu_torture_read, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) TP_PROTO(const char *rcutorturename, struct rcu_head *rhp, unsigned long secs, unsigned long c_old, unsigned long c), TP_ARGS(rcutorturename, rhp, secs, c_old, c), -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) - TP_PROTO(char *rcutorturename, struct rcu_head *rhp, - unsigned long secs, unsigned long c_old, unsigned long c), - - TP_ARGS(rcutorturename, rhp, secs, c_old, c), -#else - TP_PROTO(char *rcutorturename, struct rcu_head *rhp), - - TP_ARGS(rcutorturename, rhp), -#endif TP_FIELDS( ctf_string(rcutorturename, rcutorturename) ctf_integer_hex(struct rcu_head *, rhp, rhp) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) ctf_integer(unsigned long, secs, secs) ctf_integer(unsigned long, c_old, c_old) ctf_integer(unsigned long, c, c) -#endif ) ) -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) /* * Tracepoint for _rcu_barrier() execution. The string "s" describes * the _rcu_barrier phase: @@ -875,11 +398,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_torture_read, */ LTTNG_TRACEPOINT_EVENT(rcu_barrier, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) TP_PROTO(const char *rcuname, const char *s, int cpu, int cnt, unsigned long done), -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ - TP_PROTO(char *rcuname, char *s, int cpu, int cnt, unsigned long done), -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ TP_ARGS(rcuname, s, cpu, cnt, done), @@ -891,12 +410,9 @@ LTTNG_TRACEPOINT_EVENT(rcu_barrier, ctf_integer(unsigned long, done, done) ) ) -#endif #else /* #ifdef CONFIG_RCU_TRACE */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \ - LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0)) #define trace_rcu_grace_period(rcuname, gp_seq, gpevent) do { } while (0) #define trace_rcu_grace_period_init(rcuname, gp_seq, level, grplo, grphi, \ qsmask) do { } while (0) @@ -906,56 +422,21 @@ LTTNG_TRACEPOINT_EVENT(rcu_barrier, grplo, grphi, gp_tasks) do { } \ while (0) #define trace_rcu_fqs(rcuname, gp_seq, cpu, qsevent) do { } while (0) -#else -#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) -#define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ - qsmask) do { } while (0) -#define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) -#define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) -#define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ - grplo, grphi, gp_tasks) do { } \ - while (0) -#define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0)) #define trace_rcu_dyntick(polarity, oldnesting, newnesting, dyntick) do { } while (0) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) -#define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0) -#else -#define trace_rcu_dyntick(polarity) do { } while (0) -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) #define trace_rcu_prep_idle(reason) do { } while (0) -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0) #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \ do { } while (0) #define trace_rcu_batch_start(rcuname, qlen_lazy, qlen, blimit) \ do { } while (0) -#else -#define trace_rcu_callback(rcuname, rhp, qlen) do { } while (0) -#define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen) do { } while (0) -#define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0) -#endif #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ do { } while (0) -#else -#define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0) -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) #define trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ do { } while (0) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) -#define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0) -#endif #endif /* #else #ifdef CONFIG_RCU_TRACE */ #endif /* LTTNG_TRACE_RCU_H */ -- 2.34.1