aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-07-01 16:06:19 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2014-06-07 05:30:51 -0400
commit07be0919df18e9436065e30647026f6a8f23c8f4 (patch)
tree2ce27cac8d002ef16874301150b09ef9b7cc1d22
parent8fe8395820dc775cdb7f958d2ede74e65b895826 (diff)
Hookup sched_trace_XXX() tracing in Linux scheduler
This patch adds context switch tracing to the main Linux scheduler.
-rw-r--r--kernel/sched/core.c5
1 files changed, 5 insertions, 0 deletions
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 @@
87#include "../smpboot.h" 87#include "../smpboot.h"
88 88
89#include <litmus/trace.h> 89#include <litmus/trace.h>
90#include <litmus/sched_trace.h>
90 91
91#define CREATE_TRACE_POINTS 92#define CREATE_TRACE_POINTS
92#include <trace/events/sched.h> 93#include <trace/events/sched.h>
@@ -1974,6 +1975,8 @@ asmlinkage void schedule_tail(struct task_struct *prev)
1974 rq = this_rq(); 1975 rq = this_rq();
1975 finish_task_switch(rq, prev); 1976 finish_task_switch(rq, prev);
1976 1977
1978 sched_trace_task_switch_to(current);
1979
1977 /* 1980 /*
1978 * FIXME: do we need to worry about rq being invalidated by the 1981 * FIXME: do we need to worry about rq being invalidated by the
1979 * task_switch? 1982 * task_switch?
@@ -2993,6 +2996,7 @@ need_resched:
2993 */ 2996 */
2994litmus_need_resched_nonpreemptible: 2997litmus_need_resched_nonpreemptible:
2995 TS_SCHED_START; 2998 TS_SCHED_START;
2999 sched_trace_task_switch_away(prev);
2996 3000
2997 schedule_debug(prev); 3001 schedule_debug(prev);
2998 3002
@@ -3064,6 +3068,7 @@ litmus_need_resched_nonpreemptible:
3064 } 3068 }
3065 3069
3066 TS_SCHED2_START(prev); 3070 TS_SCHED2_START(prev);
3071 sched_trace_task_switch_to(current);
3067 3072
3068 post_schedule(rq); 3073 post_schedule(rq);
3069 3074