From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KabRc-0000ft-3g for mharc-grub-devel@gnu.org; Tue, 02 Sep 2008 15:21:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KabRa-0000fN-1h for grub-devel@gnu.org; Tue, 02 Sep 2008 15:21:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KabRY-0000ev-KS for grub-devel@gnu.org; Tue, 02 Sep 2008 15:21:37 -0400 Received: from [199.232.76.173] (port=33741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KabRY-0000er-BG for grub-devel@gnu.org; Tue, 02 Sep 2008 15:21:36 -0400 Received: from aybabtu.com ([69.60.117.155]:54906) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KabRY-0001dB-Aa for grub-devel@gnu.org; Tue, 02 Sep 2008 15:21:36 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KabHK-0007iy-U4 for grub-devel@gnu.org; Tue, 02 Sep 2008 21:11:03 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KabQ5-0002Nu-S2 for grub-devel@gnu.org; Tue, 02 Sep 2008 21:20:05 +0200 Date: Tue, 2 Sep 2008 21:20:05 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080902192005.GA9070@thorin> References: <1219943377.4598.56.camel@fz.local> <20080830120153.GG16775@thorin> <1220099792.21696.9.camel@fz.local> <20080830124245.GJ16775@thorin> <1220268256.4181.14.camel@fz.local> <1220361153.6359.9.camel@fz.local> <1220364356.6359.24.camel@fz.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1220364356.6359.24.camel@fz.local> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [RFC] Re: [PATCH] new static const char[] channel (was: modname) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2008 19:21:38 -0000 On Tue, Sep 02, 2008 at 04:05:56PM +0200, Felix Zielcke wrote: > Am Dienstag, den 02.09.2008, 15:12 +0200 schrieb Felix Zielcke: > > > current upstream SVN without my patch > > -rw-r--r-- 1 root root 25153 2. Sep 15:02 /boot/grub/core.img > > and with it > > -rw-r--r-- 1 root root 25220 2. Sep 15:10 /boot/grub/core.img > > > > So it seems it's getting 67 bytes bigger in my case :( > > As now even talked on IRC GCC seems to be able to optimize string > constants already better with directly using them instead of using a > `static const char' for them. > Probable because some strings appear in more then one file. > > So in terms of code size better use a macro for this, which would be > then a pure cosmetical change. > > Attached is now my previous patch, changed with a bit Search&Replace, so > you all can easily see how it would actually look like. I don't think there's any gain in this. Initially, I thought it'd be an improvement size-wise, but now it's only an added level of complexity when reading the code, in it just adds confusion AFAICS. Seeing that size is not an issue, I think the current use scheme of grub_dprintf is fine already. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."