diff options
Diffstat (limited to 'kernel/trace/trace_sched_switch.c')
-rw-r--r-- | kernel/trace/trace_sched_switch.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c index 863390557b44..df175cb4564f 100644 --- a/kernel/trace/trace_sched_switch.c +++ b/kernel/trace/trace_sched_switch.c | |||
@@ -49,7 +49,7 @@ probe_sched_switch(struct rq *__rq, struct task_struct *prev, | |||
49 | } | 49 | } |
50 | 50 | ||
51 | static void | 51 | static void |
52 | probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee) | 52 | probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee, int success) |
53 | { | 53 | { |
54 | struct trace_array_cpu *data; | 54 | struct trace_array_cpu *data; |
55 | unsigned long flags; | 55 | unsigned long flags; |
@@ -72,16 +72,6 @@ probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee) | |||
72 | local_irq_restore(flags); | 72 | local_irq_restore(flags); |
73 | } | 73 | } |
74 | 74 | ||
75 | static void sched_switch_reset(struct trace_array *tr) | ||
76 | { | ||
77 | int cpu; | ||
78 | |||
79 | tr->time_start = ftrace_now(tr->cpu); | ||
80 | |||
81 | for_each_online_cpu(cpu) | ||
82 | tracing_reset(tr, cpu); | ||
83 | } | ||
84 | |||
85 | static int tracing_sched_register(void) | 75 | static int tracing_sched_register(void) |
86 | { | 76 | { |
87 | int ret; | 77 | int ret; |
@@ -197,7 +187,7 @@ void tracing_sched_switch_assign_trace(struct trace_array *tr) | |||
197 | 187 | ||
198 | static void start_sched_trace(struct trace_array *tr) | 188 | static void start_sched_trace(struct trace_array *tr) |
199 | { | 189 | { |
200 | sched_switch_reset(tr); | 190 | tracing_reset_online_cpus(tr); |
201 | tracing_start_sched_switch_record(); | 191 | tracing_start_sched_switch_record(); |
202 | } | 192 | } |
203 | 193 | ||
@@ -221,7 +211,7 @@ static void sched_switch_trace_reset(struct trace_array *tr) | |||
221 | 211 | ||
222 | static void sched_switch_trace_start(struct trace_array *tr) | 212 | static void sched_switch_trace_start(struct trace_array *tr) |
223 | { | 213 | { |
224 | sched_switch_reset(tr); | 214 | tracing_reset_online_cpus(tr); |
225 | tracing_start_sched_switch(); | 215 | tracing_start_sched_switch(); |
226 | } | 216 | } |
227 | 217 | ||
@@ -247,3 +237,4 @@ __init static int init_sched_switch_trace(void) | |||
247 | return register_tracer(&sched_switch_trace); | 237 | return register_tracer(&sched_switch_trace); |
248 | } | 238 | } |
249 | device_initcall(init_sched_switch_trace); | 239 | device_initcall(init_sched_switch_trace); |
240 | |||