aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/Kconfig.debug
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-03-03 06:38:52 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-26 11:44:55 -0400
commit60a3cdd0639473c79c253bc08c8ef8f882cca107 (patch)
treee72a5ca87873b286b02966a390277f828139d350 /arch/x86/Kconfig.debug
parentb1721d0da266b4af8cb4419473b4ca36206ab200 (diff)
x86: add optimized inlining
add CONFIG_OPTIMIZE_INLINING=y. allow gcc to optimize the kernel image's size by uninlining functions that have been marked 'inline'. Previously gcc was forced by Linux to always-inline these functions via a gcc attribute: #define inline inline __attribute__((always_inline)) Especially when the user has already selected CONFIG_OPTIMIZE_FOR_SIZE=y this can make a huge difference in kernel image size (using a standard Fedora .config): text data bss dec hex filename 5613924 562708 3854336 10030968 990f78 vmlinux.before 5486689 562708 3854336 9903733 971e75 vmlinux.after that's a 2.3% text size reduction (!). Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/Kconfig.debug')
-rw-r--r--arch/x86/Kconfig.debug13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 239fd9fba0a5..5b1979a45a1e 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -257,3 +257,16 @@ config CPA_DEBUG
257 Do change_page_attr() self-tests every 30 seconds. 257 Do change_page_attr() self-tests every 30 seconds.
258 258
259endmenu 259endmenu
260
261config OPTIMIZE_INLINING
262 bool "Allow gcc to uninline functions marked 'inline'"
263 default y
264 help
265 This option determines if the kernel forces gcc to inline the functions
266 developers have marked 'inline'. Doing so takes away freedom from gcc to
267 do what it thinks is best, which is desirable for the gcc 3.x series of
268 compilers. The gcc 4.x series have a rewritten inlining algorithm and
269 disabling this option will generate a smaller kernel there. Hopefully
270 this algorithm is so good that allowing gcc4 to make the decision can
271 become the default in the future, until then this option is there to
272 test gcc for this.