From: Antoine Busque Date: Fri, 4 Dec 2015 20:16:59 +0000 (-0500) Subject: Fix: Use MAX_RT_PRIO offset in sched_wakeup_template X-Git-Tag: v2.8.0-rc1~54 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5aa835c01d3b5e319f21c1bd850a98cbf9066a3e;p=lttng-modules.git Fix: Use MAX_RT_PRIO offset in sched_wakeup_template All other sched_* events with prio fields offset the task_struct's prio value by subtracting MAX_RT_PRIO. This way the value corresponds to that given by the kernel's task_prio function, and thus with the prio context field. This adds the same offset to sched_wakeup, sched_wakeup_new, and sched_waking, via the sched_wakeup_template event class. This way their value is comparable to other sched_* events, and the prio context. Signed-off-by: Antoine Busque Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h index 4e829a33..4f3676bf 100644 --- a/instrumentation/events/lttng-module/sched.h +++ b/instrumentation/events/lttng-module/sched.h @@ -155,7 +155,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template, TP_FIELDS( ctf_array_text(char, comm, p->comm, TASK_COMM_LEN) ctf_integer(pid_t, tid, p->pid) - ctf_integer(int, prio, p->prio) + ctf_integer(int, prio, p->prio - MAX_RT_PRIO) ctf_integer(int, target_cpu, task_cpu(p)) ) ) @@ -175,7 +175,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template, TP_FIELDS( ctf_array_text(char, comm, p->comm, TASK_COMM_LEN) ctf_integer(pid_t, tid, p->pid) - ctf_integer(int, prio, p->prio) + ctf_integer(int, prio, p->prio - MAX_RT_PRIO) ctf_integer(int, success, success) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) ctf_integer(int, target_cpu, task_cpu(p))