X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fsched.h;h=c68dd27f828570a878288f08c35429488ff7935b;hb=35970083c08301623542187d9a7cdeb3bbe64cc8;hp=4f3676bf54eaafb9ba75b55354ebff7734229e7a;hpb=5aa835c01d3b5e319f21c1bd850a98cbf9066a3e;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h index 4f3676bf..c68dd27f 100644 --- a/instrumentation/events/lttng-module/sched.h +++ b/instrumentation/events/lttng-module/sched.h @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_SCHED_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include @@ -145,7 +145,8 @@ LTTNG_TRACEPOINT_EVENT(sched_kthread_stop_ret, /* * Tracepoint for waking up a task: */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) || \ + LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template, TP_PROTO(struct task_struct *p), @@ -184,7 +185,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template, ) #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) +#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 @@ -314,7 +316,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_process_template, LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template, sched_process_free, TP_PROTO(struct task_struct *p), TP_ARGS(p)) - + /* * Tracepoint for a task exiting: @@ -538,7 +540,25 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime, ) #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) +/* + * Tracepoint for showing priority inheritance modifying a tasks + * priority. + */ +LTTNG_TRACEPOINT_EVENT(sched_pi_setprio, + + TP_PROTO(struct task_struct *tsk, struct task_struct *pi_task), + + TP_ARGS(tsk, pi_task), + + TP_FIELDS( + ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN) + ctf_integer(pid_t, tid, tsk->pid) + ctf_integer(int, oldprio, tsk->prio - MAX_RT_PRIO) + ctf_integer(int, newprio, pi_task ? pi_task->prio - MAX_RT_PRIO : tsk->prio - MAX_RT_PRIO) + ) +) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) /* * Tracepoint for showing priority inheritance modifying a tasks * priority. @@ -561,4 +581,4 @@ LTTNG_TRACEPOINT_EVENT(sched_pi_setprio, #endif /* LTTNG_TRACE_SCHED_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include