Fix: update sched instrumentation for kernel 4.12
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 23 May 2017 19:45:18 +0000 (15:45 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 24 May 2017 16:11:04 +0000 (18:11 +0200)
See upstream commit b91473ff6e979c0028f02f90e40c844959c736d8

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

index 3c379e1fc9ef39955cf62dfe4b079ff27ed09ede..e6c03a3f24124a5f7426acb457d0ca3310b864e4 100644 (file)
@@ -540,7 +540,25 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+/*
+ * Tracepoint for showing priority inheritance modifying a tasks
+ * priority.
+ */
+LTTNG_TRACEPOINT_EVENT(sched_pi_setprio,
+
+       TP_PROTO(struct task_struct *tsk, struct task_struct *pi_task),
+
+       TP_ARGS(tsk, pi_task),
+
+       TP_FIELDS(
+               ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN)
+               ctf_integer(pid_t, tid, tsk->pid)
+               ctf_integer(int, oldprio, tsk->prio - MAX_RT_PRIO)
+               ctf_integer(int, newprio, pi_task ? pi_task->prio - MAX_RT_PRIO : tsk->prio - MAX_RT_PRIO)
+       )
+)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 /*
  * Tracepoint for showing priority inheritance modifying a tasks
  * priority.
This page took 0.026945 seconds and 4 git commands to generate.