mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: linux-kernel@vger.kernel.org
Subject: [patch] work around gcc-3.x inlining bugs
Date: Thu, 6 Mar 2003 03:22:08 -0800	[thread overview]
Message-ID: <20030306032208.03f1b5e2.akpm@digeo.com> (raw)


This patch:

--- 25/include/linux/compiler.h~gcc3-inline-fix	2003-03-06 03:02:43.000000000 -0800
+++ 25-akpm/include/linux/compiler.h	2003-03-06 03:11:42.000000000 -0800
@@ -1,6 +1,11 @@
 #ifndef __LINUX_COMPILER_H
 #define __LINUX_COMPILER_H
 
+#if __GNUC__ >= 3
+#define inline __inline__ __attribute__((always_inline))
+#define __inline__ __inline__ __attribute__((always_inline))
+#endif
+
 /* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
    a mechanism by which the user can annotate likely branch directions and
    expect the blocks to be reordered appropriately.  Define __builtin_expect


shrinks my 3.2.1-compiled kernel text by about 64 kbytes:

   text    data     bss     dec     hex filename
3316138  574844  726816 4617798  467646 vmlinux-before
3249255  555436  727204 4531895  4526b7 vmlinux-after

mnm:/tmp> nm vmlinux-before|grep __constant_c_and_count_memset | wc
    233     699    9553
mnm:/tmp> nm vmlinux-after|grep __constant_c_and_count_memset | wc
     13      39     533

Can anyone see a problem with it?


             reply	other threads:[~2003-03-06 11:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-06 11:22 Andrew Morton [this message]
2003-03-06 15:57 ` Jeff Garzik
2003-03-06 20:32 ` Daniel Egger
     [not found] <20030306032208.03f1b5e2.akpm@digeo.com.suse.lists.linux.kernel>
2003-03-06 11:52 ` Andi Kleen
2003-03-06 20:26   ` H. Peter Anvin
2003-03-06 21:28   ` Kurt Garloff
2003-03-09 22:40     ` Kurt Garloff

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=20030306032208.03f1b5e2.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®