Re: [PATCH -mm] lib/rwsem.c: un-inline rwsem_down_failed_common()

From: Arjan van de Ven
Date: Tue Aug 29 2006 - 05:56:28 EST


On Tue, 2006-08-29 at 10:50 +0100, David Howells wrote:
> Andreas Mohr <andi@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > Un-inlining rwsem_down_failed_common() (two callsites) reduced
> > lib/rwsem.o on my Athlon, gcc 4.1.2 from 5935 to 5480 Bytes (455 Bytes saved).
>
> Maybe this should be judged according to CONFIG_CC_OPTIMIZE_FOR_SIZE.

gcc already does this if you don't manually specify the inline
keyword ;)

static functions get inlined if they're small enough in relation to the
nr of call sites, where "small enough" is a function of -O2 vs -Os. So
leaving away inline makes gcc do its smarts.


--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/