ftrace: sched tracer fix
authorIngo Molnar <mingo@elte.hu>
Mon, 12 May 2008 19:20:51 +0000 (21:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 19:04:28 +0000 (21:04 +0200)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/sched.h
kernel/sched.c
kernel/trace/trace_sched_wakeup.c

index 6e26f1fdbfe23f48c15019c61e6f16a22d728571..05744f9cb0961b8df1221bc51da1703883eb0f64 100644 (file)
@@ -2130,17 +2130,11 @@ ftrace_ctx_switch(struct task_struct *prev, struct task_struct *next)
 #ifdef CONFIG_SCHED_TRACER
 extern void
 ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr);
-extern void
-ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr);
 #else
 static inline void
 ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr)
 {
 }
-static inline void
-ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr)
-{
-}
 #endif
 
 extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask);
index 328494e28df25cf5a633eba587b59f17e2daf2e3..53ab1174664fc53e8ea2719ef8b0d346b1af94be 100644 (file)
@@ -2613,7 +2613,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
                p->sched_class->task_new(rq, p);
                inc_nr_running(rq);
        }
-       ftrace_wake_up_new_task(p, rq->curr);
+       ftrace_wake_up_task(p, rq->curr);
        check_preempt_curr(rq, p);
 #ifdef CONFIG_SMP
        if (p->sched_class->task_wake_up)
index 87fa7b253b5720c9b08cd5801fd3f1dac576882d..2a012423f9d080eebc2765c62fca35e941c36d51 100644 (file)
@@ -201,20 +201,13 @@ out:
        atomic_dec(&tr->data[cpu]->disabled);
 }
 
-void
-wakeup_sched_wakeup(struct task_struct *wakee, struct task_struct *curr)
+void wakeup_sched_wakeup(struct task_struct *wakee, struct task_struct *curr)
 {
        if (likely(!tracer_enabled))
                return;
 
-       wakeup_check_start(wakeup_trace, wakee, curr);
-}
-
-void
-ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr)
-{
-       if (likely(!tracer_enabled))
-               return;
+       tracing_record_cmdline(curr);
+       tracing_record_cmdline(wakee);
 
        wakeup_check_start(wakeup_trace, wakee, curr);
 }