X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fsched.h;h=9eb41183b6223b73e3bc528979a2f3c14a24693f;hb=7e67e3a1d6c8722639e5adf08f97c536c41c8a86;hp=e5066afe3b55049a422afc7b944c601cdc61f9d6;hpb=25337cb556cedb95ff65c1e91aab0dea6a3e77b4;p=deliverable%2Flttng-modules.git diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h index e5066afe..9eb41183 100644 --- a/instrumentation/events/lttng-module/sched.h +++ b/instrumentation/events/lttng-module/sched.h @@ -113,6 +113,19 @@ static inline long __trace_sched_switch_state(struct task_struct *p) #endif /* _TRACE_SCHED_DEF_ */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)) +LTTNG_TRACEPOINT_ENUM(lttng_sched_policy, + TP_ENUM_VALUES( + ctf_enum_value("SCHED_NORMAL", SCHED_NORMAL) + ctf_enum_value("SCHED_FIFO", SCHED_FIFO) + ctf_enum_value("SCHED_RR", SCHED_RR) + ctf_enum_value("SCHED_BATCH", SCHED_BATCH) + ctf_enum_value("SCHED_IDLE", SCHED_IDLE) + ctf_enum_value("SCHED_DEADLINE", SCHED_DEADLINE) + ) +) +#endif + /* * Tracepoint for calling kthread_stop, performed to end a kthread: */ @@ -560,6 +573,30 @@ LTTNG_TRACEPOINT_EVENT(sched_pi_setprio, ) #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)) +/* + * Tracepoint for priority changes of a task. + */ +LTTNG_TRACEPOINT_EVENT(sched_update_prio, + + TP_PROTO(struct task_struct *tsk), + + TP_ARGS(tsk), + + TP_FIELDS( + ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN) + ctf_integer(pid_t, tid, tsk->pid) + ctf_integer(int, prio, tsk->prio - MAX_RT_PRIO) + ctf_enum(lttng_sched_policy, unsigned int, policy, tsk->policy) + ctf_integer(int, nice, task_nice(tsk)) + ctf_integer(unsigned int, rt_priority, tsk->rt_priority) + ctf_integer(u64, dl_runtime, tsk->dl.dl_runtime) + ctf_integer(u64, dl_deadline, tsk->dl.dl_deadline) + ctf_integer(u64, dl_period, tsk->dl.dl_period) + ) +) +#endif + #endif /* LTTNG_TRACE_SCHED_H */ /* This part must be outside protection */