X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Frcu.h;h=58a2306f7a59f9e010f4ee56f90b13415e104938;hb=337a9a788a14fef9dc67c7a3e118961863816ae3;hp=062dd14b742dde3c9e2cda04d1cd227bb9f84a95;hpb=f127e61ee231d002fb9a7803643a157e06f6d2e2;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/rcu.h b/instrumentation/events/lttng-module/rcu.h index 062dd14b..58a2306f 100644 --- a/instrumentation/events/lttng-module/rcu.h +++ b/instrumentation/events/lttng-module/rcu.h @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_RCU_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include /* @@ -220,31 +220,60 @@ 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(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, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) 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), -#endif TP_FIELDS( ctf_string(polarity, polarity) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - ctf_integer(long long, oldnesting, oldnesting) - ctf_integer(long long, newnesting, newnesting) -#endif ) ) +#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) /* @@ -312,8 +341,8 @@ LTTNG_TRACEPOINT_EVENT(rcu_callback, TP_FIELDS( ctf_string(rcuname, rcuname) - ctf_integer(void *, rhp, rhp) - ctf_integer(void *, func, rhp->func) + ctf_integer_hex(void *, rhp, rhp) + ctf_integer_hex(void *, func, rhp->func) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ctf_integer(long, qlen_lazy, qlen_lazy) #endif @@ -351,8 +380,8 @@ LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, TP_FIELDS( ctf_string(rcuname, rcuname) - ctf_integer(void *, rhp, rhp) - ctf_integer(unsigned long, offset, offset) + ctf_integer_hex(void *, rhp, rhp) + ctf_integer_hex(unsigned long, offset, offset) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ctf_integer(long, qlen_lazy, qlen_lazy) #endif @@ -418,8 +447,8 @@ LTTNG_TRACEPOINT_EVENT(rcu_invoke_callback, TP_FIELDS( ctf_string(rcuname, rcuname) - ctf_integer(void *, rhp, rhp) - ctf_integer(void *, func, rhp->func) + ctf_integer_hex(void *, rhp, rhp) + ctf_integer_hex(void *, func, rhp->func) ) ) @@ -442,7 +471,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_invoke_kfree_callback, TP_FIELDS( ctf_string(rcuname, rcuname) - ctf_integer(void *, rhp, rhp) + ctf_integer_hex(void *, rhp, rhp) ctf_integer(unsigned long, offset, offset) ) ) @@ -524,7 +553,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_torture_read, TP_FIELDS( ctf_string(rcutorturename, rcutorturename) - ctf_integer(struct rcu_head *, rhp, rhp) + 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) @@ -583,7 +612,9 @@ LTTNG_TRACEPOINT_EVENT(rcu_barrier, grplo, grphi, gp_tasks) do { } \ while (0) #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) +#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) @@ -624,4 +655,4 @@ LTTNG_TRACEPOINT_EVENT(rcu_barrier, #endif /* LTTNG_TRACE_RCU_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include