build kernel/profile.o only when requested
Build kernel/profile.o only if CONFIG_PROFILING is enabled.
This makes CONFIG_PROFILING=n kernels smaller.
As a bonus, some profile_tick() calls and one branch from schedule() are
now eliminated with CONFIG_PROFILING=n (but I doubt these are
measurable effects).
This patch changes the effects of CONFIG_PROFILING=n, but I don't think
having more than two choices would be the better choice.
This patch also adds the name of the first parameter to the prototypes
of profile_{hits,tick}() since I anyway had to add them for the dummy
functions.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
696adfe84c
commit
b03f6489f9
@@ -112,8 +112,6 @@ void __init profile_init(void)
|
||||
|
||||
/* Profile event notifications */
|
||||
|
||||
#ifdef CONFIG_PROFILING
|
||||
|
||||
static BLOCKING_NOTIFIER_HEAD(task_exit_notifier);
|
||||
static ATOMIC_NOTIFIER_HEAD(task_free_notifier);
|
||||
static BLOCKING_NOTIFIER_HEAD(munmap_notifier);
|
||||
@@ -203,8 +201,6 @@ void unregister_timer_hook(int (*hook)(struct pt_regs *))
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(unregister_timer_hook);
|
||||
|
||||
#endif /* CONFIG_PROFILING */
|
||||
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user