)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-/*
- * Tracepoint for showing priority inheritance modifying a tasks
- * priority.
- */
-LTTNG_TRACEPOINT_EVENT(sched_pi_setprio,
+LTTNG_TRACEPOINT_EVENT_CLASS(sched_prio_template,
TP_PROTO(struct task_struct *tsk, int newprio),
ctf_integer(int, newprio, newprio - MAX_RT_PRIO)
)
)
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+/*
+ * Tracepoint for showing priority inheritance modifying a tasks
+ * priority.
+ */
+LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_prio_template, sched_pi_setprio,
+ TP_PROTO(struct task_struct *tsk, int newprio),
+ TP_ARGS(tsk, newprio))
+
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+/*
+ * Tracepoint for priority changes of a task.
+ */
+LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_prio_template, sched_set_prio,
+ TP_PROTO(struct task_struct *tsk, int newprio),
+ TP_ARGS(tsk, newprio))
#endif
#endif /* LTTNG_TRACE_SCHED_H */
(unsigned long long)__entry->vruntime)
);
-/*
- * Tracepoint for showing priority inheritance modifying a tasks
- * priority.
- */
-TRACE_EVENT(sched_pi_setprio,
+DECLARE_EVENT_CLASS(sched_prio_template,
TP_PROTO(struct task_struct *tsk, int newprio),
__entry->oldprio, __entry->newprio)
);
+/*
+ * Tracepoint for showing priority inheritance modifying a tasks
+ * priority.
+ */
+DEFINE_EVENT(sched_prio_template, sched_pi_setprio,
+ TP_PROTO(struct task_struct *tsk, int newprio),
+ TP_ARGS(tsk, newprio));
+
+/*
+ * Tracepoint for priority changes of a task.
+ */
+DEFINE_EVENT(sched_prio_template, sched_set_prio,
+ TP_PROTO(struct task_struct *tsk, int newprio),
+ TP_ARGS(tsk, newprio));
+
#endif /* _TRACE_SCHED_H */
/* This part must be outside protection */