mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 10:49:28 +00:00
tracing/function-return-tracer: clean up task start/exit callbacks
Impact: cleanup Eliminate #ifdefs in core code by using empty inline functions. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
f201ae2356
commit
82f60f0bc8
4 changed files with 3 additions and 6 deletions
|
@ -335,6 +335,9 @@ extern void unregister_ftrace_return(void);
|
||||||
|
|
||||||
extern void ftrace_retfunc_init_task(struct task_struct *t);
|
extern void ftrace_retfunc_init_task(struct task_struct *t);
|
||||||
extern void ftrace_retfunc_exit_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
|
||||||
|
|
||||||
#endif /* _LINUX_FTRACE_H */
|
#endif /* _LINUX_FTRACE_H */
|
||||||
|
|
|
@ -1128,9 +1128,7 @@ NORET_TYPE void do_exit(long code)
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
/* causes final put_task_struct in finish_task_switch(). */
|
/* causes final put_task_struct in finish_task_switch(). */
|
||||||
tsk->state = TASK_DEAD;
|
tsk->state = TASK_DEAD;
|
||||||
#ifdef CONFIG_FUNCTION_RET_TRACER
|
|
||||||
ftrace_retfunc_exit_task(tsk);
|
ftrace_retfunc_exit_task(tsk);
|
||||||
#endif
|
|
||||||
schedule();
|
schedule();
|
||||||
BUG();
|
BUG();
|
||||||
/* Avoid "noreturn function does return". */
|
/* Avoid "noreturn function does return". */
|
||||||
|
|
|
@ -1270,9 +1270,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
|
||||||
total_forks++;
|
total_forks++;
|
||||||
spin_unlock(¤t->sighand->siglock);
|
spin_unlock(¤t->sighand->siglock);
|
||||||
write_unlock_irq(&tasklist_lock);
|
write_unlock_irq(&tasklist_lock);
|
||||||
#ifdef CONFIG_FUNCTION_RET_TRACER
|
|
||||||
ftrace_retfunc_init_task(p);
|
ftrace_retfunc_init_task(p);
|
||||||
#endif
|
|
||||||
proc_fork_connector(p);
|
proc_fork_connector(p);
|
||||||
cgroup_post_fork(p);
|
cgroup_post_fork(p);
|
||||||
return p;
|
return p;
|
||||||
|
|
|
@ -5901,9 +5901,7 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
|
||||||
* The idle tasks have their own, simple scheduling class:
|
* The idle tasks have their own, simple scheduling class:
|
||||||
*/
|
*/
|
||||||
idle->sched_class = &idle_sched_class;
|
idle->sched_class = &idle_sched_class;
|
||||||
#ifdef CONFIG_FUNCTION_RET_TRACER
|
|
||||||
ftrace_retfunc_init_task(idle);
|
ftrace_retfunc_init_task(idle);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue