diff options
-rw-r--r-- | include/trace/sched.h | 4 | ||||
-rw-r--r-- | kernel/sched.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/trace/sched.h b/include/trace/sched.h index 9b2854abf7e2..f4549d506b16 100644 --- a/include/trace/sched.h +++ b/include/trace/sched.h | |||
@@ -30,8 +30,8 @@ DECLARE_TRACE(sched_switch, | |||
30 | TPARGS(rq, prev, next)); | 30 | TPARGS(rq, prev, next)); |
31 | 31 | ||
32 | DECLARE_TRACE(sched_migrate_task, | 32 | DECLARE_TRACE(sched_migrate_task, |
33 | TPPROTO(struct rq *rq, struct task_struct *p, int dest_cpu), | 33 | TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu), |
34 | TPARGS(rq, p, dest_cpu)); | 34 | TPARGS(p, orig_cpu, dest_cpu)); |
35 | 35 | ||
36 | DECLARE_TRACE(sched_process_free, | 36 | DECLARE_TRACE(sched_process_free, |
37 | TPPROTO(struct task_struct *p), | 37 | TPPROTO(struct task_struct *p), |
diff --git a/kernel/sched.c b/kernel/sched.c index 7729c4bbc8ba..d377097572f9 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1851,6 +1851,8 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu) | |||
1851 | 1851 | ||
1852 | clock_offset = old_rq->clock - new_rq->clock; | 1852 | clock_offset = old_rq->clock - new_rq->clock; |
1853 | 1853 | ||
1854 | trace_sched_migrate_task(p, task_cpu(p), new_cpu); | ||
1855 | |||
1854 | #ifdef CONFIG_SCHEDSTATS | 1856 | #ifdef CONFIG_SCHEDSTATS |
1855 | if (p->se.wait_start) | 1857 | if (p->se.wait_start) |
1856 | p->se.wait_start -= clock_offset; | 1858 | p->se.wait_start -= clock_offset; |
@@ -2868,7 +2870,6 @@ static void sched_migrate_task(struct task_struct *p, int dest_cpu) | |||
2868 | || unlikely(!cpu_active(dest_cpu))) | 2870 | || unlikely(!cpu_active(dest_cpu))) |
2869 | goto out; | 2871 | goto out; |
2870 | 2872 | ||
2871 | trace_sched_migrate_task(rq, p, dest_cpu); | ||
2872 | /* force the process onto the specified CPU */ | 2873 | /* force the process onto the specified CPU */ |
2873 | if (migrate_task(p, dest_cpu, &req)) { | 2874 | if (migrate_task(p, dest_cpu, &req)) { |
2874 | /* Need to wait for migration thread (might exit: take ref). */ | 2875 | /* Need to wait for migration thread (might exit: take ref). */ |