From: Ezequiel Garcia <elezegarcia@gmail.com>
To: <linux-kernel@vger.kernel.org>
Cc: Tim Bird <tim.bird@am.sony.com>,
mmarek@suse.cz, sam@ravnborg.org, rientjes@google.com,
Ezequiel Garcia <elezegarcia@gmail.com>
Subject: [PATCH v2] Makefile: Add option to disable gcc automatic inlining
Date: Sun, 7 Oct 2012 16:18:52 -0300 [thread overview]
Message-ID: <1349637532-27466-1-git-send-email-elezegarcia@gmail.com> (raw)
The new option is CONFIG_CC_DISABLE_AUTO_INLINE and it's
located at:
* Kernel hacking
* Disable gcc automatic inlining
This option appends this options CFLAGS:
-fno-default-inline
-fno-inline
-fno-inline-small-functions
-fno-indirect-inlining
-fno-inline-functions-called-once
It's still not clear which of these really work and which doesn't.
Just in case, just disable all of them.
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
Changes from v1:
* Change define name to CONFIG_CC_XXX
* Disable all options that refer to inlining
This work is part of CELF Workgroup Project:
"Kernel_dynamic_memory_allocation_tracking_and_reduction":
http://elinux.org/Kernel_dynamic_memory_allocation_tracking_and_reduction
Makefile | 8 ++++++++
kernel/trace/Kconfig | 4 ++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index ddf5be9..3169603 100644
--- a/Makefile
+++ b/Makefile
@@ -561,6 +561,14 @@ else
KBUILD_CFLAGS += -O2
endif
+ifdef CONFIG_CC_DISABLE_AUTO_INLINE
+KBUILD_CFLAGS += -fno-default-inline \
+ -fno-inline \
+ -fno-inline-small-functions \
+ -fno-indirect-inlining \
+ -fno-inline-functions-called-once
+endif
+
include $(srctree)/arch/$(SRCARCH)/Makefile
ifdef CONFIG_READABLE_ASM
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 8c4c070..144da36 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -128,6 +128,10 @@ config TRACING_SUPPORT
depends on STACKTRACE_SUPPORT
default y
+config CC_DISABLE_AUTO_INLINE
+ bool "Disable gcc automatic inlining"
+ default n
+
if TRACING_SUPPORT
menuconfig FTRACE
--
1.7.8.6
next reply other threads:[~2012-10-07 19:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 19:18 Ezequiel Garcia [this message]
2012-10-07 22:21 ` Andi Kleen
2012-10-07 22:34 ` Ezequiel Garcia
2012-10-07 22:30 ` richard -rw- weinberger
2012-10-07 22:35 ` Ezequiel Garcia
2012-10-10 2:52 ` Ezequiel Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349637532-27466-1-git-send-email-elezegarcia@gmail.com \
--to=elezegarcia@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=rientjes@google.com \
--cc=sam@ravnborg.org \
--cc=tim.bird@am.sony.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®