Re: [patch 00/2] improve .text size on gcc 4.0 and newer compilers

From: Jakub Jelinek
Date: Thu Jan 05 2006 - 09:33:42 EST


On Thu, Jan 05, 2006 at 01:19:12PM +0100, Arjan van de Ven wrote:
> obvious candidates for __rare are
> * pm suspend/resume functions
> * error handling functions
> * initialization stuff (including mount time stuff for filesystems,
> and hardware setup for drivers)
>
> I wonder if gcc can be convinced to put all unlikely() code sections
> into a .text.rare as well, that'd be really cool.

gcc 4.1 calls them .text.unlikely and you need to use
-freorder-blocks-and-partition
switch. But I haven't been able to reproduce it on a short testcase I
cooked up, so maybe it is broken ATM (it put the whole function into
.text rather than the expected part into .text.unlikely and left
empty .text.unlikely).

Jakub
-
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/