]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
tracing/function-return-tracer: clean up task start/exit callbacks
authorIngo Molnar <mingo@elte.hu>
Sun, 23 Nov 2008 08:18:56 +0000 (09:18 +0100)
committerIngo Molnar <mingo@elte.hu>
Sun, 23 Nov 2008 08:19:35 +0000 (09:19 +0100)
Impact: cleanup

Eliminate #ifdefs in core code by using empty inline functions.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/ftrace.h
kernel/exit.c
kernel/fork.c
kernel/sched.c

index 2ba259b2defa47e116fe15996e2eaa361c47912e..938ca194264128706fdd6ac48c2fda16c3635476 100644 (file)
@@ -335,6 +335,9 @@ extern void unregister_ftrace_return(void);
 
 extern void ftrace_retfunc_init_task(struct task_struct *t);
 extern void ftrace_retfunc_exit_task(struct task_struct *t);
+#else
+static inline void ftrace_retfunc_init_task(struct task_struct *t) { }
+static inline void ftrace_retfunc_exit_task(struct task_struct *t) { }
 #endif
 
 #endif /* _LINUX_FTRACE_H */
index b9d446329da17299e8f6b9de5ab438f5d323ae44..ef04d03b3286d600ac65e5fa6ad1ad7e85645f4d 100644 (file)
@@ -1128,9 +1128,7 @@ NORET_TYPE void do_exit(long code)
        preempt_disable();
        /* causes final put_task_struct in finish_task_switch(). */
        tsk->state = TASK_DEAD;
-#ifdef CONFIG_FUNCTION_RET_TRACER
        ftrace_retfunc_exit_task(tsk);
-#endif
        schedule();
        BUG();
        /* Avoid "noreturn function does return".  */
index d1eb30e69cccc880f84e65514221e3a5f0e91245..fbf4a4c0a628a442f25468dff2fb462aea3fba63 100644 (file)
@@ -1270,9 +1270,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
        total_forks++;
        spin_unlock(&current->sighand->siglock);
        write_unlock_irq(&tasklist_lock);
-#ifdef CONFIG_FUNCTION_RET_TRACER
        ftrace_retfunc_init_task(p);
-#endif
        proc_fork_connector(p);
        cgroup_post_fork(p);
        return p;
index fb17205950de936959a3fd5860b1d05529327444..388d9db044ab42c6e950de96c4298435c2d031b1 100644 (file)
@@ -5901,9 +5901,7 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
         * The idle tasks have their own, simple scheduling class:
         */
        idle->sched_class = &idle_sched_class;
-#ifdef CONFIG_FUNCTION_RET_TRACER
        ftrace_retfunc_init_task(idle);
-#endif
 }
 
 /*