From: Michael Jeanson Date: Tue, 23 May 2017 19:45:18 +0000 (-0400) Subject: Fix: update sched instrumentation for kernel 4.12 X-Git-Tag: v2.10.0-rc2~8 X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=commitdiff_plain;h=35970083c08301623542187d9a7cdeb3bbe64cc8 Fix: update sched instrumentation for kernel 4.12 See upstream commit b91473ff6e979c0028f02f90e40c844959c736d8 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h index e5066afe..c68dd27f 100644 --- a/instrumentation/events/lttng-module/sched.h +++ b/instrumentation/events/lttng-module/sched.h @@ -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.