Connect to the sched_update_prio tracepoint
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 13 May 2016 18:59:56 +0000 (14:59 -0400)
committerJulien Desfossez <jdesfossez@efficios.com>
Mon, 19 Sep 2016 16:54:44 +0000 (12:54 -0400)
commit7e67e3a1d6c8722639e5adf08f97c536c41c8a86
treeb6801c1057438003bb2ca85e7b21aba76d4eef62
parent25337cb556cedb95ff65c1e91aab0dea6a3e77b4
Connect to the sched_update_prio tracepoint

This tracepoint allows to keep track of all explicit priority changes of a
task. It outputs the scheduling policy, the nice value, the rt_priority and the
deadline-related attributes (dl_runtime, dl_deadline and dl_period).

It is emitted in the code path of the sched_setscheduler, sched_setattr,
sched_setparam, and nice system calls.

This allows the analysis of real-time scheduling delays based on the configured
scheduling priorities and policies, which cannot be performed with the current
instrumentation in sched_switch. Also, instead of exposing the internal kernel
prio field, this tracepoint only outputs the user-visible priority attributes.

The effective priority of running threads can also be temporarily changed in
the PI code, but a dedicated tracepoint is already in place to cover this case.

Here are a few output examples:
After fork of a normal task:

renice -n 10 of a normal task:
sched_update_prio: { cpu_id = 4 }, { comm = "sleep", tid = 8149, prio = 30,
policy = ( "SCHED_NORMAL" : container = 0 ), nice = 10, rt_priority = 0,
dl_runtime = 0, dl_deadline = 0, dl_period = 0 }

SCHED_FIFO 60:
sched_update_prio: { cpu_id = 6 }, { comm = "chrt", tid = 7857, prio = -61,
policy = ( "SCHED_FIFO" : container = 1 ), nice = 0, rt_priority = 60,
dl_runtime = 0, dl_deadline = 0, dl_period = 0 }

SCHED_RR 60:
sched_update_prio: { cpu_id = 3 }, { comm = "chrt", tid = 8157, prio = -61,
policy = ( "SCHED_RR" : container = 2 ), nice = 0, rt_priority = 60, dl_runtime
= 0, dl_deadline = 0, dl_period = 0 }

SCHED_DEADLINE:
sched_update_prio: { cpu_id = 7 }, { comm = "b", tid = 8162, prio = -101,
policy = ( "SCHED_DEADLINE" : container = 6 ), nice = 0, rt_priority = 0,
dl_runtime = 10000000, dl_deadline = 30000000, dl_period = 30000000 }

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
instrumentation/events/lttng-module/sched.h
instrumentation/events/mainline/sched.h
This page took 0.026556 seconds and 5 git commands to generate.