From 07be0919df18e9436065e30647026f6a8f23c8f4 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Mon, 1 Jul 2013 22:06:19 +0200 Subject: Hookup sched_trace_XXX() tracing in Linux scheduler This patch adds context switch tracing to the main Linux scheduler. --- kernel/sched/core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 17992b28e2bf..3d37e2a09dcc 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -87,6 +87,7 @@ #include "../smpboot.h" #include +#include #define CREATE_TRACE_POINTS #include @@ -1974,6 +1975,8 @@ asmlinkage void schedule_tail(struct task_struct *prev) rq = this_rq(); finish_task_switch(rq, prev); + sched_trace_task_switch_to(current); + /* * FIXME: do we need to worry about rq being invalidated by the * task_switch? @@ -2993,6 +2996,7 @@ need_resched: */ litmus_need_resched_nonpreemptible: TS_SCHED_START; + sched_trace_task_switch_away(prev); schedule_debug(prev); @@ -3064,6 +3068,7 @@ litmus_need_resched_nonpreemptible: } TS_SCHED2_START(prev); + sched_trace_task_switch_to(current); post_schedule(rq); -- cgit v1.2.2