diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-07-01 16:06:19 -0400 |
|---|---|---|
| committer | Namhoon Kim <namhoonk@cs.unc.edu> | 2014-10-21 10:03:34 -0400 |
| commit | bb196a3537cf825b18aa46cdf962fb9422bc2a8f (patch) | |
| tree | a307b37e4dc2a1eccf268f964114b6dd6261e134 /kernel | |
| parent | e44cd07ea0123cac05852b00f3c9d514a8999933 (diff) | |
Hookup sched_trace_XXX() tracing in Linux scheduler
This patch adds context switch tracing to the main Linux scheduler.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/core.c | 5 |
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 | */ |
| 2994 | litmus_need_resched_nonpreemptible: | 2997 | litmus_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 | ||
