diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-09-28 12:06:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-06 11:08:15 -0400 |
commit | c73464b1c8434ad4cbfd5369c3e724f3e8ffe5a4 (patch) | |
tree | 3823bb8bc9fe7f97a6e26283354e62e96a7680fd /kernel/trace | |
parent | fc13aebab7d8f0d19d557c721a0f25cdf7ae905c (diff) |
sched/core: Fix trace_sched_switch()
__trace_sched_switch_state() is the last remaining PREEMPT_ACTIVE
user, move trace_sched_switch() from prepare_task_switch() to
__schedule() and propagate the @preempt argument.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_sched_switch.c | 3 | ||||
-rw-r--r-- | kernel/trace/trace_sched_wakeup.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index b0623ac785a2..00611e95a8ee 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -5697,7 +5697,7 @@ free: | |||
5697 | } | 5697 | } |
5698 | 5698 | ||
5699 | static void | 5699 | static void |
5700 | ftrace_graph_probe_sched_switch(void *ignore, | 5700 | ftrace_graph_probe_sched_switch(void *ignore, bool preempt, |
5701 | struct task_struct *prev, struct task_struct *next) | 5701 | struct task_struct *prev, struct task_struct *next) |
5702 | { | 5702 | { |
5703 | unsigned long long timestamp; | 5703 | unsigned long long timestamp; |
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c index f270088e9929..4c896a0101bd 100644 --- a/kernel/trace/trace_sched_switch.c +++ b/kernel/trace/trace_sched_switch.c | |||
@@ -16,7 +16,8 @@ static int sched_ref; | |||
16 | static DEFINE_MUTEX(sched_register_mutex); | 16 | static DEFINE_MUTEX(sched_register_mutex); |
17 | 17 | ||
18 | static void | 18 | static void |
19 | probe_sched_switch(void *ignore, struct task_struct *prev, struct task_struct *next) | 19 | probe_sched_switch(void *ignore, bool preempt, |
20 | struct task_struct *prev, struct task_struct *next) | ||
20 | { | 21 | { |
21 | if (unlikely(!sched_ref)) | 22 | if (unlikely(!sched_ref)) |
22 | return; | 23 | return; |
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c index 12cbe77b4136..4bcfbac289ff 100644 --- a/kernel/trace/trace_sched_wakeup.c +++ b/kernel/trace/trace_sched_wakeup.c | |||
@@ -420,7 +420,7 @@ tracing_sched_wakeup_trace(struct trace_array *tr, | |||
420 | } | 420 | } |
421 | 421 | ||
422 | static void notrace | 422 | static void notrace |
423 | probe_wakeup_sched_switch(void *ignore, | 423 | probe_wakeup_sched_switch(void *ignore, bool preempt, |
424 | struct task_struct *prev, struct task_struct *next) | 424 | struct task_struct *prev, struct task_struct *next) |
425 | { | 425 | { |
426 | struct trace_array_cpu *data; | 426 | struct trace_array_cpu *data; |