From 820725b0eb59f6011e379cc526ae90a6f3efeb50 Mon Sep 17 00:00:00 2001 From: Gabriele Monaco Date: Mon, 30 Mar 2026 13:10:08 +0200 Subject: sched: Add deadline tracepoints Add the following tracepoints: * sched_dl_throttle(dl_se, cpu, type): Called when a deadline entity is throttled * sched_dl_replenish(dl_se, cpu, type): Called when a deadline entity's runtime is replenished * sched_dl_update(dl_se, cpu, type): Called when a deadline entity updates without throttle or replenish * sched_dl_server_start(dl_se, cpu, type): Called when a deadline server is started * sched_dl_server_stop(dl_se, cpu, type): Called when a deadline server is stopped Those tracepoints can be useful to validate the deadline scheduler with RV and are not exported to tracefs. Reviewed-by: Phil Auld Acked-by: Juri Lelli Link: https://lore.kernel.org/r/20260330111010.153663-11-gmonaco@redhat.com Signed-off-by: Gabriele Monaco --- include/trace/events/sched.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'include/trace') diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 7b2645b50e78..535860581f15 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -896,6 +896,32 @@ DECLARE_TRACE(sched_set_need_resched, TP_PROTO(struct task_struct *tsk, int cpu, int tif), TP_ARGS(tsk, cpu, tif)); +#define DL_OTHER 0 +#define DL_TASK 1 +#define DL_SERVER_FAIR 2 +#define DL_SERVER_EXT 3 + +DECLARE_TRACE(sched_dl_throttle, + TP_PROTO(struct sched_dl_entity *dl_se, int cpu, u8 type), + TP_ARGS(dl_se, cpu, type)); + +DECLARE_TRACE(sched_dl_replenish, + TP_PROTO(struct sched_dl_entity *dl_se, int cpu, u8 type), + TP_ARGS(dl_se, cpu, type)); + +/* Call to update_curr_dl_se not involving throttle or replenish */ +DECLARE_TRACE(sched_dl_update, + TP_PROTO(struct sched_dl_entity *dl_se, int cpu, u8 type), + TP_ARGS(dl_se, cpu, type)); + +DECLARE_TRACE(sched_dl_server_start, + TP_PROTO(struct sched_dl_entity *dl_se, int cpu, u8 type), + TP_ARGS(dl_se, cpu, type)); + +DECLARE_TRACE(sched_dl_server_stop, + TP_PROTO(struct sched_dl_entity *dl_se, int cpu, u8 type), + TP_ARGS(dl_se, cpu, type)); + #endif /* _TRACE_SCHED_H */ /* This part must be outside protection */ -- cgit v1.2.3