Warn and return on fd overflow fdt
[lttng-modules.git] / include / instrumentation / events / sched.h
index a08495e81acfd14fa1174c7cb84d41225a0d7b99..5f994759d20350af13fcfeb088bce3be4727ff82 100644 (file)
@@ -17,7 +17,8 @@
 #ifndef _TRACE_SCHED_DEF_
 #define _TRACE_SCHED_DEF_
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) \
+       || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
 
 static inline long __trace_sched_switch_state(bool preempt,
                unsigned int prev_state,
@@ -222,7 +223,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup_new,
  * Tracepoint for task switches, performed by the scheduler:
  */
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) \
+       || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(sched_switch,
 
        TP_PROTO(bool preempt,
@@ -482,6 +484,24 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template, sched_stat_blocked,
             TP_PROTO(struct task_struct *tsk, u64 delay),
             TP_ARGS(tsk, delay))
 
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
+/*
+ * Tracepoint for accounting runtime (time the task is executing
+ * on a CPU).
+ */
+LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
+
+       TP_PROTO(struct task_struct *tsk, u64 runtime),
+
+       TP_ARGS(tsk, runtime),
+
+       TP_FIELDS(
+               ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN)
+               ctf_integer(pid_t, tid, tsk->pid)
+               ctf_integer(u64, runtime, runtime)
+       )
+)
+#else
 /*
  * Tracepoint for accounting runtime (time the task is executing
  * on a CPU).
@@ -499,6 +519,7 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
                ctf_integer(u64, vruntime, vruntime)
        )
 )
+#endif
 
 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0) || \
        LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \
This page took 0.024138 seconds and 4 git commands to generate.