+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) || \
+ LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0))
+
+/*
+ * Tracepoint called when waking a task; this tracepoint is guaranteed to be
+ * called from the waking context.
+ */
+LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_waking,
+ TP_PROTO(struct task_struct *p),
+ TP_ARGS(p))
+
+/*
+ * Tracepoint called when the task is actually woken; p->state == TASK_RUNNNG.
+ * It it not always called from the waking context.
+ */
+LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup,
+ TP_PROTO(struct task_struct *p),
+ TP_ARGS(p))
+
+/*
+ * Tracepoint for waking up a new task:
+ */
+LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup_new,
+ TP_PROTO(struct task_struct *p),
+ TP_ARGS(p))
+
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))