ANDROID: sched: move blocked reason trace point to cover all class
Now, we only export CFS taks' blocked reasons but it's important and useful to know other class' blocked reasons such as RT tasks. Move the blocked reason trace point to where the scheduler core layer and before the task's state moves to the waking state. Thus, we could cover all the sched classes. Bug: 203080186 Test: check traces Signed-off-by: Martin Liu <liumartin@google.com> Change-Id: Ic61865642d852d0127cdcf474adf8c06e4c2d570
This commit is contained in:
@@ -3116,6 +3116,9 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
|
||||
if (READ_ONCE(p->on_rq) && ttwu_runnable(p, wake_flags))
|
||||
goto unlock;
|
||||
|
||||
if (p->state & TASK_UNINTERRUPTIBLE)
|
||||
trace_sched_blocked_reason(p);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
* Ensure we load p->on_cpu _after_ p->on_rq, otherwise it would be
|
||||
|
@@ -999,7 +999,6 @@ update_stats_enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
|
||||
}
|
||||
|
||||
trace_sched_stat_blocked(tsk, delta);
|
||||
trace_sched_blocked_reason(tsk);
|
||||
|
||||
/*
|
||||
* Blocking time is in units of nanosecs, so shift by
|
||||
|
Reference in New Issue
Block a user