Fix: update rcu instrumentation for v4.16
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 12 Feb 2018 17:32:25 +0000 (18:32 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 12 Feb 2018 18:42:34 +0000 (13:42 -0500)
See upstream commits :

  commit dec98900eae1e22467182e58688abe5fae98bd5f
  Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  Date:   Wed Oct 4 16:24:29 2017 -0700

    rcu: Add ->dynticks field to rcu_dyntick trace event

  commit 84585aa8b6ad24e5bdfba9db4a320a6aeed192ab
  Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  Date:   Wed Oct 4 15:55:16 2017 -0700

    rcu: Shrink ->dynticks_{nmi_,}nesting from long long to long

    Because the ->dynticks_nesting field now only contains the process-based
    nesting level instead of a value encoding both the process nesting level
    and the irq "nesting" level, we no longer need a long long, even on
    32-bit systems.  This commit therefore changes both the ->dynticks_nesting
    and ->dynticks_nmi_nesting fields to long.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/rcu.h

index 869de08f973f2bb1b782549a83537709f0f92a92..4528a79b556aaf11a1daaba96f5fcbad5aa87353 100644 (file)
@@ -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))
 /*
This page took 0.035467 seconds and 4 git commands to generate.