From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S272721AbTG1H6t (ORCPT ); Mon, 28 Jul 2003 03:58:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S272726AbTG1H6t (ORCPT ); Mon, 28 Jul 2003 03:58:49 -0400 Received: from jive.SoftHome.net ([66.54.152.27]:54160 "HELO jive.SoftHome.net") by vger.kernel.org with SMTP id S272721AbTG1H6r (ORCPT ); Mon, 28 Jul 2003 03:58:47 -0400 Message-ID: <3F24DB59.1010600@softhome.net> Date: Mon, 28 Jul 2003 10:14:17 +0200 From: "Ihar \"Philips\" Filipau" Organization: Home Sweet Home User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Miles Bader CC: Hollis Blanchard , Otto Solares , "J.A. Magallon" , Alan Cox , David McCullough , uclinux-dev@uclinux.org, Linux Kernel Mailing List Subject: Re: Kernel 2.6 size increase - get_current()? References: <9CA735B0-BEAD-11D7-BEDE-000A95A0560C@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Miles Bader wrote: > Hollis Blanchard writes: > >>Inlines don't always help performance (depending on cache sizes, branch >>penalties, frequency of code access...), but they do always increase >>code size. > > > Um, inlining can often _decrease_ code size because it gives the > compiler substantial new opportunities for optimization (the function > body is no longer opaque, so the compiler has a lot more info, and any > optimizations done on the inlined body can be context-specific). > starting from -O3 gcc do always trys to do inlining. was observed on gcc 3.2 and I beleive I saw the same 2.95.3 compile this test with 02 & 03: ------------------- #include int aaa() { return 32; } int main() { int b = aaa(); printf("hello %d \n", b); return 0; } ------------------ and then objdump -d to see the difference between main()s: 02 - you will see function call, 03 - you will see just raw number 0x20 used.