From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Skipping unexec via a big .elc file Date: Mon, 27 Mar 2017 22:27:26 -0400 Message-ID: <144D5F87-D876-485D-BAB3-2AA93627272A@raeburn.org> References: <9463F91F-DB82-48E1-BE01-1E2BC8DA0766@raeburn.org> <831swxzbw8.fsf@gnu.org> <83y3z2wphb.fsf@gnu.org> <83tw9bb42m.fsf@gnu.org> <349ED8B9-C34B-495B-9FB5-E72CE6EFCA38@raeburn.org> <87inpni6xa.fsf@linux-m68k.org> <8360lmesso.fsf@gnu.org> <3B044D64-7C94-42D7-BE1B-7A9CA76C5A67@raeburn.org> <83k29xc49v.fsf@gnu.org> <2C5C5C6E-9D73-4613-948B-C15B93968717@raeburn.org> <83poiy8cnv.fsf@gnu.org> <83r32mqq5f.fsf@gnu.org> <83zih1jf37.fsf@gnu.org> <8A8DA980-13A7-4F8B-9D07-391728C673C9@raeburn.org> <831su4dmn4.fsf@gnu.org> <87h9300x5n.fsf@linux-m68k.org> <734D2132-71FD-414D-B091-629189742DB4@raeburn.org> <83a8889ede.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1490668096 12138 195.159.176.226 (28 Mar 2017 02:28:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Mar 2017 02:28:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 28 04:28:11 2017 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 1csgrY-0001Vw-R1 for ged-emacs-devel@m.gmane.org; Tue, 28 Mar 2017 04:28:01 +0200 Original-Received: from localhost ([::1]:49624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csgre-0003Lt-Gi for ged-emacs-devel@m.gmane.org; Mon, 27 Mar 2017 22:28:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csgr8-0003Ln-9n for emacs-devel@gnu.org; Mon, 27 Mar 2017 22:27:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csgr5-0000rx-5T for emacs-devel@gnu.org; Mon, 27 Mar 2017 22:27:34 -0400 Original-Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:34742) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csgr4-0000rg-VR for emacs-devel@gnu.org; Mon, 27 Mar 2017 22:27:31 -0400 Original-Received: by mail-qk0-x241.google.com with SMTP id 10so4330790qkh.1 for ; Mon, 27 Mar 2017 19:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Lw6TydTtjih9wJ9/EmYK/m4wLDNBx6ao8cCfkaxx+84=; b=hr+DF7r0aURBdjMj8Nt7LZGMcGrXBd4e90eY3K6cfBOWgl2SNI58wbKySQUYUqkhR+ W+p4btZdcVl1FkmWFZPgx6bOQtfkNv7xhpi6rLFCyHep97CIUjyffFGakpLIZwmHx+hJ InhbG4vZvxdbsmvt/J23jXVqzQDffRpHSkk7Chu3hNpLzSJafe1czw9PbiID30QhKIt6 lTrEnhKVeX6OG8yZ8TP4UHXCAplAJCuXtnl5yvWCW/EUmJ4SiXURE4vqHFB9XIylep/F Bgsdd3HZrOH27ksGInGnanMjO2gFelUnXUWNdxfMUOb6I5dF8p0HZ8hXsjiHmLlKQ87E J55Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Lw6TydTtjih9wJ9/EmYK/m4wLDNBx6ao8cCfkaxx+84=; b=XlM21qfj+JGnq6AUDLt6awHZl8eI5DM4FTAK3aLaC8zLc5n3siB9/mFO6duc9WSwyH biGtRLw6WHN64xOdBiFQAUT9LcfaA7nPR4+pwCOJ+M4gzu6bclSwGJ1g9Xgo/xBWz+Ql WMjlCFYaDnqF+C+V2eE0L5OW9Y+f9Fr7vZgG6ToCpd9R8VxdmALdNoCfgq64gG9IwoPz vSk73YvCAQ1Qu9Uxh7frqvVnAhn2OtwFybPSaFNhAl7pP4bpHCHV0CZJOK5mLcO8SOug hqLhFbLYpZIAlR3KeyxGRHeTDJHX2WJ2OIi35xtOkQqXVBwMlsC6ug6vFPWz7Mj6pg5e TNpQ== X-Gm-Message-State: AFeK/H25f18cNoUXJLvDUmopUgRo68JUpVn0YRum136aweaJei35YYQCbnIbbC+BZYV2xA== X-Received: by 10.55.135.7 with SMTP id j7mr21498816qkd.58.1490668050138; Mon, 27 Mar 2017 19:27:30 -0700 (PDT) Original-Received: from [192.168.23.52] (c-50-138-183-136.hsd1.ma.comcast.net. [50.138.183.136]) by smtp.gmail.com with ESMTPSA id q8sm1687525qki.58.2017.03.27.19.27.28 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Mar 2017 19:27:28 -0700 (PDT) In-Reply-To: <83a8889ede.fsf@gnu.org> X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 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:213434 Archived-At: On Mar 26, 2017, at 12:44, Eli Zaretskii wrote: >> From: Ken Raeburn >> Date: Mon, 13 Mar 2017 04:25:19 -0400 >> Cc: Emacs developers >>=20 >> I have a patch which seems to recreate all the abbrev tables that = were in the initial Emacs process, including the sharing = (lisp-mode-abbrev-table being a parent of emacs-lisp-mode-abbrev-table; = local-abbrev-table set to the fundamental mode table). Please let me = know if it fixes your problem. >=20 > Sorry for the long delay: Life=E2=84=A2 intervened big time=E2=80=A6 It happens. No worries. >=20 >> It depends on a couple key things: (1) The abbrev tables are empty at = that point, so we don=E2=80=99t have to worry about reconstructing all = the abbrevs in a table; this can be fixed, it=E2=80=99s just tedious. = (2) Abbrev-table values are only used as symbol values, or parents of = other abbrev tables. This is much harder. Stefan=E2=80=99s printable = replacement for obarrays would probably be a better solution. Though, = normally I=E2=80=99d expect people to want printing of an obarray to = show symbol names, and for this use case we need the function, value, = and plist data as well. >=20 > I applied your patch, and while dumping I get an error message: >=20 > Dumping into dumped.elc...preparing... > Dumping into dumped.elc...generating... > Symbol's function definition is void: cl-labels >=20 > and dumped.elc is not re-created. What did I miss? Looks like I missed a =E2=80=9Crequire=E2=80=9D or =E2=80=9Cload=E2=80=9D = to pull in cl-macs. Perhaps it=E2=80=99s loaded by something else in my = build that=E2=80=99s platform-dependent (X11 vs Windows?) and isn=E2=80=99= t in yours; I=E2=80=99m not sure. But it isn=E2=80=99t working for me to = just load it explicitly without fixing up the load path too. Perhaps I = should=E2=80=99ve just defined a helper function instead of using = cl-labels. For now, try adding this patch. It bootstraps for me, and should get = cl-labels defined. diff --git a/lisp/loadup.el b/lisp/loadup.el index 4ef9712ab6..f9251020cd 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -57,6 +57,17 @@ ;; Add subdirectories to the load-path for files that might get ;; autoloaded when bootstrapping. ;; This is because PATH_DUMPLOADSEARCH is just "../lisp". +(let ((dir (car load-path))) + (message "load path is %S" load-path) + (setq load-path (list (expand-file-name "." dir) + (expand-file-name "emacs-lisp" dir) + (expand-file-name "language" dir) + (expand-file-name "international" dir) + (expand-file-name "textmodes" dir) + (expand-file-name "vc" dir)))) + +(setq purify-flag nil) + (if (or (equal (member "bootstrap" command-line-args) '("bootstrap")) ;; FIXME this is irritatingly fragile. (equal (nth 4 command-line-args) "unidata-gen.el") @@ -64,19 +75,10 @@ (if (fboundp 'dump-emacs) (string-match "src/bootstrap-emacs" (nth 0 = command-line-args)) t)) - (let ((dir (car load-path))) - ;; We'll probably overflow the pure space. - (setq purify-flag nil) - ;; Value of max-lisp-eval-depth when compiling initially. - ;; During bootstrapping the byte-compiler is run interpreted when - ;; compiling itself, which uses a lot more stack than usual. - (setq max-lisp-eval-depth 2200) - (setq load-path (list (expand-file-name "." dir) - (expand-file-name "emacs-lisp" dir) - (expand-file-name "language" dir) - (expand-file-name "international" dir) - (expand-file-name "textmodes" dir) - (expand-file-name "vc" dir))))) + ;; Value of max-lisp-eval-depth when compiling initially. + ;; During bootstrapping the byte-compiler is run interpreted when + ;; compiling itself, which uses a lot more stack than usual. + (setq max-lisp-eval-depth 2200)) =20 (if (eq t purify-flag) ;; Hash consing saved around 11% of pure space in my tests. @@ -308,6 +310,8 @@ ;; Preload some constants and floating point functions. (load "emacs-lisp/float-sup") =20 +(load "emacs-lisp/cl-macs") + (load "vc/vc-hooks") (load "vc/ediff-hook") (load "uniquify")