Connect sched_set_prio probe sched_set_prio
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 13 May 2016 18:59:56 +0000 (14:59 -0400)
committerJulien Desfossez <jdesfossez@efficios.com>
Mon, 27 Jun 2016 16:18:03 +0000 (12:18 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
instrumentation/events/lttng-module/sched.h
instrumentation/events/mainline/sched.h

index 3c379e1fc9ef39955cf62dfe4b079ff27ed09ede..2a9abd900f43c50a2dffd2fd15a0d3237cd8c2c0 100644 (file)
@@ -540,12 +540,7 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-/*
- * Tracepoint for showing priority inheritance modifying a tasks
- * priority.
- */
-LTTNG_TRACEPOINT_EVENT(sched_pi_setprio,
+LTTNG_TRACEPOINT_EVENT_CLASS(sched_prio_template,
 
        TP_PROTO(struct task_struct *tsk, int newprio),
 
@@ -558,6 +553,25 @@ LTTNG_TRACEPOINT_EVENT(sched_pi_setprio,
                ctf_integer(int, newprio, newprio - MAX_RT_PRIO)
        )
 )
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+/*
+ * Tracepoint for showing priority inheritance modifying a tasks
+ * priority.
+ */
+LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_prio_template, sched_pi_setprio,
+            TP_PROTO(struct task_struct *tsk, int newprio),
+            TP_ARGS(tsk, newprio))
+
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+/*
+ * Tracepoint for priority changes of a task.
+ */
+LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_prio_template, sched_set_prio,
+            TP_PROTO(struct task_struct *tsk, int newprio),
+            TP_ARGS(tsk, newprio))
 #endif
 
 #endif /* LTTNG_TRACE_SCHED_H */
index ea7a2035456d4f913e15b9997696ab5ca4934ad1..3fb3a27ce3d242ff1ae8c1b680d5de6539620e10 100644 (file)
@@ -397,11 +397,7 @@ TRACE_EVENT(sched_stat_runtime,
                        (unsigned long long)__entry->vruntime)
 );
 
-/*
- * Tracepoint for showing priority inheritance modifying a tasks
- * priority.
- */
-TRACE_EVENT(sched_pi_setprio,
+DECLARE_EVENT_CLASS(sched_prio_template,
 
        TP_PROTO(struct task_struct *tsk, int newprio),
 
@@ -426,6 +422,21 @@ TRACE_EVENT(sched_pi_setprio,
                        __entry->oldprio, __entry->newprio)
 );
 
+/*
+ * Tracepoint for showing priority inheritance modifying a tasks
+ * priority.
+ */
+DEFINE_EVENT(sched_prio_template, sched_pi_setprio,
+               TP_PROTO(struct task_struct *tsk, int newprio),
+               TP_ARGS(tsk, newprio));
+
+/*
+ * Tracepoint for priority changes of a task.
+ */
+DEFINE_EVENT(sched_prio_template, sched_set_prio,
+               TP_PROTO(struct task_struct *tsk, int newprio),
+               TP_ARGS(tsk, newprio));
+
 #endif /* _TRACE_SCHED_H */
 
 /* This part must be outside protection */
This page took 0.026562 seconds and 5 git commands to generate.