diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:18:50 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:20:24 -0400 |
commit | 74a69e4f0bee220103bba81891c168579494b14b (patch) | |
tree | afb79aed60e43840bad70b3071689f9a045b173b | |
parent | 13e68a73175041c83713fd1905c65fe612f73862 (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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 377273d6cecc..cbf2995d3871 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -88,6 +88,7 @@ | |||
88 | #include "../smpboot.h" | 88 | #include "../smpboot.h" |
89 | 89 | ||
90 | #include <litmus/trace.h> | 90 | #include <litmus/trace.h> |
91 | #include <litmus/sched_trace.h> | ||
91 | 92 | ||
92 | #define CREATE_TRACE_POINTS | 93 | #define CREATE_TRACE_POINTS |
93 | #include <trace/events/sched.h> | 94 | #include <trace/events/sched.h> |
@@ -2293,6 +2294,9 @@ asmlinkage __visible void schedule_tail(struct task_struct *prev) | |||
2293 | /* finish_task_switch() drops rq->lock and enables preemtion */ | 2294 | /* finish_task_switch() drops rq->lock and enables preemtion */ |
2294 | preempt_disable(); | 2295 | preempt_disable(); |
2295 | rq = finish_task_switch(prev); | 2296 | rq = finish_task_switch(prev); |
2297 | |||
2298 | sched_trace_task_switch_to(current); | ||
2299 | |||
2296 | post_schedule(rq); | 2300 | post_schedule(rq); |
2297 | 2301 | ||
2298 | if (sched_state_validate_switch()) | 2302 | if (sched_state_validate_switch()) |
@@ -2756,6 +2760,7 @@ static void __sched __schedule(void) | |||
2756 | prev = rq->curr; | 2760 | prev = rq->curr; |
2757 | 2761 | ||
2758 | TS_SCHED_START; | 2762 | TS_SCHED_START; |
2763 | sched_trace_task_switch_away(prev); | ||
2759 | 2764 | ||
2760 | schedule_debug(prev); | 2765 | schedule_debug(prev); |
2761 | 2766 | ||
@@ -2821,6 +2826,7 @@ static void __sched __schedule(void) | |||
2821 | } | 2826 | } |
2822 | 2827 | ||
2823 | TS_SCHED2_START(prev); | 2828 | TS_SCHED2_START(prev); |
2829 | sched_trace_task_switch_to(current); | ||
2824 | 2830 | ||
2825 | post_schedule(rq); | 2831 | post_schedule(rq); |
2826 | 2832 | ||