From: Steven Rostedt Add a tracepoint that shows the priority of a task being boosted via priority inheritance. Cc: Peter Zijlstra Cc: Gregory Haskins Signed-off-by: Steven Rostedt --- include/trace/events/sched.h | 25 +++++++++++++++++++++++++ kernel/sched.c | 1 + 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 0e0c108..8feb641 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -398,6 +398,31 @@ DEFINE_EVENT_PRINT(sched_rt_push_pull, sched_rt_pull, __entry->comm, __entry->pid, __entry->prio, __entry->cpu)); +TRACE_EVENT(sched_rt_setprio, + + TP_PROTO(struct task_struct *tsk, int newprio), + + TP_ARGS(tsk, newprio), + + TP_STRUCT__entry( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) + __field( int, oldprio ) + __field( int, newprio ) + ), + + TP_fast_assign( + memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); + __entry->pid = tsk->pid; + __entry->oldprio = tsk->prio; + __entry->newprio = newprio; + ), + + TP_printk("comm=%s pid=%d oldprio=%d newprio=%d", + __entry->comm, __entry->pid, + __entry->oldprio, __entry->newprio) +); + #endif /* _TRACE_SCHED_H */ /* This part must be outside protection */ diff --git a/kernel/sched.c b/kernel/sched.c index ed09d4f..4d4f35e 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4358,6 +4358,7 @@ void rt_mutex_setprio(struct task_struct *p, int prio) rq = task_rq_lock(p, &flags); + trace_sched_rt_setprio(p, prio); oldprio = p->prio; prev_class = p->sched_class; on_rq = p->se.on_rq; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/