linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm: add optimized inlining
Date: Wed, 24 Nov 2010 15:57:00 -0800	[thread overview]
Message-ID: <1290643020-24558-3-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1290643020-24558-1-git-send-email-sboyd@codeaurora.org>

This patch is inspired by 60a3cdd (x86: add optimized inlining,
2008-03-03). GCC is currently being forced to inline whatever
functions are marked as inline (due to the #define of inline to
the gcc attribute always_inline). The 4.x series of GCC has a
rewritten inlining algorithm which should be good enough for the
kernel's purposes. Enabling this option will allow GCC to decide
when to inline a function marked as inline. Since it's opt-in and
doesn't affect functions marked as always_inline there shouldn't
be much harm in allowing people to enable this. If there is, we
should find the affected functions and mark them as always_inline.

	text    data     bss     dec     hex filename
	5987182  246104  926696 7159982  6d40ae vmlinux.orig
	5794190  246104  926744 6967038  6a4efe vmlinux.new

It reduces the text section of my kernel by 3.3%, which is pretty
nice.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 arch/arm/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index db524e7..1ed7968 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -23,6 +23,7 @@ config ARM
 	select PERF_USE_VMALLOC
 	select HAVE_REGS_AND_STACK_ACCESS_API
 	select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7))
+	select ARCH_SUPPORTS_OPTIMIZED_INLINING
 	help
 	  The ARM series is a line of low-power-consumption RISC chip designs
 	  licensed by ARM Ltd and targeted at embedded applications and
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

      parent reply	other threads:[~2010-11-24 23:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 23:56 [PATCH 0/2] Optimized inlining for ARM Stephen Boyd
2010-11-24 23:56 ` [PATCH 1/2] Make OPTIMIZE_INLINING a generic option Stephen Boyd
2010-11-24 23:57 ` Stephen Boyd [this message]

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=1290643020-24558-3-git-send-email-sboyd@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).