From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: pdumper's performance Date: Wed, 29 Aug 2018 22:14:11 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535595148 19849 195.159.176.226 (30 Aug 2018 02:12:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 30 Aug 2018 02:12:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: "Daniel Colascione" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 30 04:12:24 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fvCRc-000536-2R for ged-emacs-devel@m.gmane.org; Thu, 30 Aug 2018 04:12:24 +0200 Original-Received: from localhost ([::1]:46517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvCTi-0003MP-0c for ged-emacs-devel@m.gmane.org; Wed, 29 Aug 2018 22:14:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvCTb-0003MI-NI for emacs-devel@gnu.org; Wed, 29 Aug 2018 22:14:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvCTX-0008Qd-SU for emacs-devel@gnu.org; Wed, 29 Aug 2018 22:14:27 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:38043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvCTT-0008Ol-5r for emacs-devel@gnu.org; Wed, 29 Aug 2018 22:14:21 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w7U2ECTg014523; Wed, 29 Aug 2018 22:14:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id D594F69F6E; Wed, 29 Aug 2018 22:14:11 -0400 (EDT) In-Reply-To: (Daniel Colascione's message of "Wed, 29 Aug 2018 15:10:24 -0700") X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.7 X-NAI-Spam-Rules: 4 Rules triggered SEE_FOR_YOURSELF=0.5, SBJ_DRGSX=0.2, EDT_SA_DN_PASS=0, RV6362=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6362> : inlines <6838> : streams <1796953> : uri <2699076> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:229082 Archived-At: Thanks Daniel for your prompt response. I have some further questions, tho. > You can see for yourself whether there's an impact. Compile an Emacs with > support for both pdumper and unexec, dump it with unexec, and compare its > GC performance to Emacs built without support for pdumper and also dumped > with unexec. I hoping to save myself the time ;-) [ BTW, part of the reason for those questions is that I'm writing an article about the history of Elisp, and I'd like to understand how your code works so I can say something intelligent about it. Oh and there's not much time left before the deadline. Another part of course, is that I'd like to see this feature land on master. ] > As I recall, the difference is minimal. Do you recall the tests you used and the ballpark of the difference? >> Also I don't quite understand why this is needed: IIUC the markbits of >> pdump'd objects are stored elsewhere, but I don't understand why that >> needs to be the case. > Because we don't store dumped objects in blocks and so the calculations of > the normal locations of their mark bits would be wrong. Hmm... OK that could explain it for conses and floats where we keep the markbits separately from the objects in bitmaps alongside those blocs, but you also have those _marked_p and set__marked functions for all other types of objects where the markbit is normally stored within the object itself (i.e. it doesn't matter whether they're in blocks or not). Why did you choose to use a completely different layout for the objects loaded from the dump? I naively thought your code would take cons_blocks, symbol_blocks, ... and write those blocks as-is so objects keep the same layout, and things like mark_maybe_object don't need to be changed at all. I understand this would end up writing larger dumps (since they would include some free objects), but I'd have expected it would lead to simpler code and a smaller patch. What am I missing? Stefan