aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_sched_switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_sched_switch.c')
-rw-r--r--kernel/trace/trace_sched_switch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c
index 5555b906a666..5a217e863586 100644
--- a/kernel/trace/trace_sched_switch.c
+++ b/kernel/trace/trace_sched_switch.c
@@ -29,6 +29,8 @@ ctx_switch_func(void *__rq, struct task_struct *prev, struct task_struct *next)
29 if (!tracer_enabled) 29 if (!tracer_enabled)
30 return; 30 return;
31 31
32 tracing_record_cmdline(prev);
33
32 local_irq_save(flags); 34 local_irq_save(flags);
33 cpu = raw_smp_processor_id(); 35 cpu = raw_smp_processor_id();
34 data = tr->data[cpu]; 36 data = tr->data[cpu];
@@ -56,6 +58,8 @@ wakeup_func(void *__rq, struct task_struct *wakee, struct task_struct *curr)
56 if (!tracer_enabled) 58 if (!tracer_enabled)
57 return; 59 return;
58 60
61 tracing_record_cmdline(curr);
62
59 local_irq_save(flags); 63 local_irq_save(flags);
60 cpu = raw_smp_processor_id(); 64 cpu = raw_smp_processor_id();
61 data = tr->data[cpu]; 65 data = tr->data[cpu];
@@ -75,8 +79,6 @@ void
75ftrace_ctx_switch(void *__rq, struct task_struct *prev, 79ftrace_ctx_switch(void *__rq, struct task_struct *prev,
76 struct task_struct *next) 80 struct task_struct *next)
77{ 81{
78 tracing_record_cmdline(prev);
79
80 /* 82 /*
81 * If tracer_switch_func only points to the local 83 * If tracer_switch_func only points to the local
82 * switch func, it still needs the ptr passed to it. 84 * switch func, it still needs the ptr passed to it.
@@ -93,8 +95,6 @@ void
93ftrace_wake_up_task(void *__rq, struct task_struct *wakee, 95ftrace_wake_up_task(void *__rq, struct task_struct *wakee,
94 struct task_struct *curr) 96 struct task_struct *curr)
95{ 97{
96 tracing_record_cmdline(curr);
97
98 wakeup_func(__rq, wakee, curr); 98 wakeup_func(__rq, wakee, curr);
99 99
100 /* 100 /*