From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Bloat in the Emacs Windows package Date: Mon, 22 Apr 2019 21:40:39 +0100 Message-ID: <87r29t22pk.fsf@russet.org.uk> References: <87mukocyze.fsf@russet.org.uk> <83v9zceb3n.fsf@gnu.org> <87tvev1epx.fsf@russet.org.uk> <83v9zbcesn.fsf@gnu.org> <87a7gnypsx.fsf@russet.org.uk> <83sguecxth.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="742"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) Cc: bjourne@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 22 22:46:28 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 1hIfpa-0018CX-SL for ged-emacs-devel@m.gmane.org; Mon, 22 Apr 2019 22:46:27 +0200 Original-Received: from localhost ([127.0.0.1]:44031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIfpU-0003Cq-EM for ged-emacs-devel@m.gmane.org; Mon, 22 Apr 2019 16:46:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIfpH-0002vr-Ac for emacs-devel@gnu.org; Mon, 22 Apr 2019 16:46:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIfkl-0000X5-KF for emacs-devel@gnu.org; Mon, 22 Apr 2019 16:41:28 -0400 Original-Received: from cloud103.planethippo.com ([78.129.138.110]:47256) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hIfkh-0008Us-M8; Mon, 22 Apr 2019 16:41:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uqwXrro5USFikVEiCcPQTU9Xa2Anqrk5gE2uYm8ip78=; b=NPYNhO0CiuzyNrlIfMTMGCDMj wKp1gFbis4Q4PadfZPm/EKz2w+Pe7n0HVr2VuG22HHmoy4Psj8Hz8KgXaELD2LP9V2eJnmCUhVE27 Ldb+0cb9GO0Um9aDBnQMDsbHvLK4kUABMdflcdt3sZ1MnQlAG3YwhXkGkVxqtWKtL72xrKlsRkMKt cV5qeJRjwHHDN2pM1bqEVsaHDWmXi9SFg2iQ9PRDgB55NL6kSkCbn3NlL5yOIB5Ri++lHCfno+/p9 JpuoqsLJnJh9QnAa6MEbmTQFhxvLHMVvOTEtoADhrTr7g6f1bQcg0/ZjXkdZyfkluWpQA6vAjkbu/ p1QvkZn0A==; Original-Received: from cpc142652-benw12-2-0-cust953.16-2.cable.virginm.net ([82.21.43.186]:60786 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hIfk0-0007iS-BT; Mon, 22 Apr 2019 21:40:40 +0100 In-Reply-To: <83sguecxth.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Apr 2019 09:29:30 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 78.129.138.110 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:235785 Archived-At: Eli Zaretskii writes: >> 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. >From what you are saying, emacs.exe and emacs-26.2.exe *will be* hard links before they are zipped, but not after. >> 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. I am currently not treating snapshots and release builds differently at all. When I took over the windows builds, there were no snapshots to my knowledge. It's possible that is why I put debug symbols in and meant to take them out but didn't. > 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. Indeed. Perhaps, here-in, lies the solution. I currently have snapshots for master only. I could produce these for both master and release branch and build these with debug info; while tagged releases would get them without. The risk here is that snapshots might get behind release builds, since I'd consider the release to be more important than the snapshot when a new tag is made. >> 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. At the moment, I specify -O2 specifically in my build. I guess this is because if I specify any CFLAGS I need to give them all. Still, if this is not windows specific I will wait till Emacs over all changes. >> - 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. This I will do. Phil