tracing: add sched_set_prio tracepoint
This tracepoint allows to keep track of all priority changes made by all
sites that can change this value. The impacted system calls are
sched_setscheduler, sched_setattr, sched_process_fork and set_user_nice.
The priority inheritance mechanism from rt_mutex gets also instrumented
with this tracepoint even though there is a dedicated tracepoint for it
(sched_pi_setprio).
This allows analysis of real-time scheduling delays per thread priority,
which cannot be performed accurately if we only trace the priority of
the currently scheduled processes.
Here is an example of what is output by ftrace when we change the
priority of a running process:
sys_sched_setscheduler(pid: 1c52, policy: 2, param:
7ffc22e20980)
sched_set_prio: comm=burnP6 pid=7250 oldprio=120 newprio=39
sys_sched_setscheduler -> 0x0
sched_switch: prev_comm=chrt prev_pid=7268 prev_prio=120
prev_state=R ==> next_comm=burnP6 next_pid=7250
next_prio=39
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>