Update RCU instrumentation to Linux 3.12
[lttng-modules.git] / instrumentation / events / lttng-module / rcu.h
index 56434aa48067491bfc8097703f779186d52e9002..1220fb726b36f45eaee1ca81326c800272373f87 100644 (file)
  */
 TRACE_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),
 
@@ -443,7 +447,11 @@ TRACE_EVENT(rcu_kfree_callback,
  */
 TRACE_EVENT(rcu_batch_start,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+       TP_PROTO(char *rcuname, long qlen_lazy, long qlen, long blimit),
+
+       TP_ARGS(rcuname, qlen_lazy, qlen, blimit),
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
        TP_PROTO(char *rcuname, long qlen_lazy, long qlen, int blimit),
 
        TP_ARGS(rcuname, qlen_lazy, qlen, blimit),
@@ -459,7 +467,11 @@ TRACE_EVENT(rcu_batch_start,
                __field(long, qlen_lazy)
 #endif
                __field(long, qlen)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+               __field(long, blimit)
+#else
                __field(int, blimit)
+#endif
        ),
 
        TP_fast_assign(
@@ -471,7 +483,11 @@ TRACE_EVENT(rcu_batch_start,
                tp_assign(blimit, blimit)
        ),
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+       TP_printk("%s CBs=%ld/%ld bl=%ld",
+                 __get_str(rcuname), __entry->qlen_lazy, __entry->qlen,
+                 __entry->blimit)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
        TP_printk("%s CBs=%ld/%ld bl=%d",
                  __get_str(rcuname), __entry->qlen_lazy, __entry->qlen,
                  __entry->blimit)
@@ -604,22 +620,45 @@ TRACE_EVENT(rcu_batch_end,
  */
 TRACE_EVENT(rcu_torture_read,
 
+#if (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_STRUCT__entry(
                __string(rcutorturename, rcutorturename)
                __field(struct rcu_head *, rhp)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+               __field(unsigned long, secs)
+               __field(unsigned long, c_old)
+               __field(unsigned long, c)
+#endif
        ),
 
        TP_fast_assign(
                tp_strcpy(rcutorturename, rcutorturename)
                tp_assign(rhp, rhp)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+               tp_assign(secs, secs)
+               tp_assign(c_old, c_old)
+               tp_assign(c, c)
+#endif
        ),
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+       TP_printk("%s torture read %p %luus c: %lu %lu",
+                 __entry->rcutorturename, __entry->rhp,
+                 __entry->secs, __entry->c_old, __entry->c)
+#else
        TP_printk("%s torture read %p",
                  __get_str(rcutorturename), __entry->rhp)
+#endif
 )
 #endif
 
@@ -707,7 +746,10 @@ TRACE_EVENT(rcu_barrier,
 #else
 #define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#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))
This page took 0.027391 seconds and 4 git commands to generate.