aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f286554e3395..50f9f4c45ce9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -87,6 +87,8 @@
87#include "../workqueue_internal.h" 87#include "../workqueue_internal.h"
88#include "../smpboot.h" 88#include "../smpboot.h"
89 89
90#include <litmus/trace.h>
91
90#define CREATE_TRACE_POINTS 92#define CREATE_TRACE_POINTS
91#include <trace/events/sched.h> 93#include <trace/events/sched.h>
92 94
@@ -2748,6 +2750,8 @@ static void __sched __schedule(void)
2748 rcu_note_context_switch(); 2750 rcu_note_context_switch();
2749 prev = rq->curr; 2751 prev = rq->curr;
2750 2752
2753 TS_SCHED_START;
2754
2751 schedule_debug(prev); 2755 schedule_debug(prev);
2752 2756
2753 if (sched_feat(HRTICK)) 2757 if (sched_feat(HRTICK))
@@ -2800,14 +2804,24 @@ static void __sched __schedule(void)
2800 rq->curr = next; 2804 rq->curr = next;
2801 ++*switch_count; 2805 ++*switch_count;
2802 2806
2807 TS_SCHED_END(next);
2808 TS_CXS_START(next);
2803 rq = context_switch(rq, prev, next); /* unlocks the rq */ 2809 rq = context_switch(rq, prev, next); /* unlocks the rq */
2810 TS_CXS_END(current);
2811
2804 cpu = cpu_of(rq); 2812 cpu = cpu_of(rq);
2805 } else 2813 } else {
2814 TS_SCHED_END(prev);
2806 raw_spin_unlock_irq(&rq->lock); 2815 raw_spin_unlock_irq(&rq->lock);
2816 }
2817
2818 TS_SCHED2_START(prev);
2807 2819
2808 post_schedule(rq); 2820 post_schedule(rq);
2809 2821
2810 sched_preempt_enable_no_resched(); 2822 sched_preempt_enable_no_resched();
2823
2824 TS_SCHED2_END(prev);
2811} 2825}
2812 2826
2813static inline void sched_submit_work(struct task_struct *tsk) 2827static inline void sched_submit_work(struct task_struct *tsk)