Commit 189b7ee6 authored by Thomas Gleixner's avatar Thomas Gleixner

trace: add tracepoint to rtmutex_setprio()

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent ea12f1ec
......@@ -262,6 +262,37 @@ TRACE_EVENT(sched_process_exit,
__entry->comm, __entry->pid, __entry->prio)
);
/*
* Tracepoint for priority boosting/deboosting of a task:
*
* (NOTE: the 'rq' argument is not used by generic trace events,
* but used by the latency tracer plugin. )
*/
TRACE_EVENT(sched_task_setprio,
TP_PROTO(struct rq *rq, struct task_struct *p, int oldprio),
TP_ARGS(rq, p, oldprio),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, prio )
__field( int, oldprio )
),
TP_fast_assign(
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->prio = p->prio;
__entry->oldprio = oldprio;
),
TP_printk("task %s:%d [%d] oldprio=%d",
__entry->comm, __entry->pid, __entry->prio,
__entry->oldprio)
);
/*
* Tracepoint for a waiting task:
*/
......
......@@ -5908,6 +5908,8 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
p->prio = prio;
trace_sched_task_setprio(rq, p, oldprio);
if (running)
p->sched_class->set_curr_task(rq);
if (on_rq) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment