From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bloat in the Emacs Windows package Date: Fri, 19 Apr 2019 09:29:30 +0300 Message-ID: <83sguecxth.fsf@gnu.org> References: <87mukocyze.fsf@russet.org.uk> <83v9zceb3n.fsf@gnu.org> <87tvev1epx.fsf@russet.org.uk> <83v9zbcesn.fsf@gnu.org> <87a7gnypsx.fsf@russet.org.uk> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="133187"; mail-complaints-to="usenet@blaine.gmane.org" Cc: bjourne@gmail.com, emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 19 08:29:57 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hHN25-000YWe-8h for ged-emacs-devel@m.gmane.org; Fri, 19 Apr 2019 08:29:57 +0200 Original-Received: from localhost ([127.0.0.1]:52080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHN24-0007zY-8E for ged-emacs-devel@m.gmane.org; Fri, 19 Apr 2019 02:29:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHN1y-0007zP-Fz for emacs-devel@gnu.org; Fri, 19 Apr 2019 02:29:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHN1x-0002mE-Q7; Fri, 19 Apr 2019 02:29:49 -0400 Original-Received: from [176.228.60.248] (port=2562 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hHN1x-0001z0-1R; Fri, 19 Apr 2019 02:29:49 -0400 In-reply-to: <87a7gnypsx.fsf@russet.org.uk> (phillip.lord@russet.org.uk) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235642 Archived-At: > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: bjourne@gmail.com, emacs-devel@gnu.org > Date: Thu, 18 Apr 2019 22:19:26 +0100 > > > objcopy --only-keep-debug emacs.exe emacs.debug > > strip -g emacs.exe > > objcopy --add-gnu-debuglink=emacs.debug emacs.exe > > > > When unpacked, the emacs.debug file should install into the bin/.debug > > directory of the Emacs installation. > > Would this impact on emacs-26.2.exe also or would I need to things like: > > objcopy --only-keep-debug emacs.exe emacs.debug > strip -g emacs.exe > strip -g emacs-26.2.exe > objcopy --add-gnu-debuglink=emacs.debug emacs.exe > objcopy --add-gnu-debuglink=emacs.debug emacs-26.2.exe There is no magic: if emacs.exe and emacs-26.2.exe are two separate files (not hard links to the same file data), then yes, you will need the additional commands above. Sorry for not saying that explicitly. > To summarise my feelings about the thread so far: > > - I think most normal users don't need debug symbols, so I would be > minded to remove them (or not put them). I don't know why I have > added "-g3" to the default options. People who know what to do with > debug symbols are likely to be able to build Emacs for > themselves. Are we only talking about official releases, or do you include development snapshots in the above reasoning? Snapshots should include the symbols IMO, to facilitate more efficient debugging of problems reported for them. The assumption is that people who install snapshots are more cognizant about debugging and are less "normal" than those who download official releases, in the sense that they prefer efficient bug reports to disk space savings. > Unanswered questions for me: > > - If we remove debug symbols, why not do -O3 which may produce some > performance benefit? IME, -O3 is useless for Emacs, probably because the expensive inner loops are very large. It does produce a larger executable, which is another downside. It is also less well tested, since thedefault build uses -O2. That said, my metrics were done years ago, and it's possible that nowadays -O3 performs better. If we want to explore this, someone should try building Emacs with -O3 and producing some measurements for GCC versions 7 and up to 9. And I don't think this is Windows specific: if -O3 produces worthy benefits, we might consider using it in production builds on all platforms. > - Is it better to do "-g0" which I believe stops adding debug symbols, > or switch "make install" for "make install-strip"? I'd say the latter, because 'install-strip' is the official GNU way of getting a stripped binary. Thanks.