Fix: make sched instrumentation build for 4.3 kernel
authorRabin Vincent <rabin.vincent@axis.com>
Mon, 26 Oct 2015 11:40:31 +0000 (12:40 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 26 Oct 2015 18:38:02 +0000 (14:38 -0400)
The backported patch "Fix: update sched wakeup instrumentation for 4.3
kernel" (c93180196ea8) used a newer definition of
LTTNG_TRACEPOINT_EVENT_CLASS which is not available in v2.6.

Signed-off-by: Rabin Vincent <rabinv@axis.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/sched.h

index f6b65ae2e98ad36651588accabe3504b1c8241af..d2e03f9d989c853917d63bd2718e97786377f445 100644 (file)
@@ -142,12 +142,26 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
 
        TP_ARGS(p),
 
-       TP_FIELDS(
-               ctf_array_text(char, comm, p->comm, TASK_COMM_LEN)
-               ctf_integer(pid_t, tid, p->pid)
-               ctf_integer(int, prio, p->prio)
-               ctf_integer(int, target_cpu, task_cpu(p))
+       TP_STRUCT__entry(
+               __array_text(   char,   comm,   TASK_COMM_LEN   )
+               __field(        pid_t,  tid                     )
+               __field(        int,    prio                    )
+               __field(        int,    target_cpu              )
+       ),
+
+       TP_fast_assign(
+               tp_memcpy(comm, p->comm, TASK_COMM_LEN)
+               tp_assign(tid, p->pid)
+               tp_assign(prio, p->prio)
+               tp_assign(target_cpu, task_cpu(p))
        )
+       TP_perf_assign(
+               __perf_task(p)
+       ),
+
+       TP_printk("comm=%s tid=%d prio=%d target_cpu=%03d",
+                 __entry->comm, __entry->tid, __entry->prio,
+                 __entry->target_cpu)
 )
 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
 LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
This page took 0.026913 seconds and 4 git commands to generate.