From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36649: 27.0.50; pure space and pdumper Date: Sun, 21 Jul 2019 12:53:21 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000e11ba9058e307302" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="29601"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36649@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 21 14:55:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpBN4-0007PV-Kj for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Jul 2019 14:55:23 +0200 Original-Received: from localhost ([::1]:55944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpBN3-0000dT-Lu for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Jul 2019 08:55:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37030) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpBMs-0000Yx-Ga for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 08:55:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpBMk-0007Gg-Q4 for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 08:55:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49379) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpBMk-0007GG-E1 for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 08:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hpBMk-0002iJ-9l for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 08:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jul 2019 12:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36649 X-GNU-PR-Package: emacs Original-Received: via spool by 36649-submit@debbugs.gnu.org id=B36649.156371364310360 (code B ref 36649); Sun, 21 Jul 2019 12:55:02 +0000 Original-Received: (at 36649) by debbugs.gnu.org; 21 Jul 2019 12:54:03 +0000 Original-Received: from localhost ([127.0.0.1]:58201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpBLn-0002h2-HM for submit@debbugs.gnu.org; Sun, 21 Jul 2019 08:54:03 -0400 Original-Received: from mail-oi1-f178.google.com ([209.85.167.178]:34947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpBLm-0002gZ-T8 for 36649@debbugs.gnu.org; Sun, 21 Jul 2019 08:54:03 -0400 Original-Received: by mail-oi1-f178.google.com with SMTP id a127so27653436oii.2 for <36649@debbugs.gnu.org>; Sun, 21 Jul 2019 05:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LK8pNpnpMmL/0Fx8EftnjOE9dEXjVzkZWUQBwl4spJ4=; b=h9IHDFNyQPrkYIO8DWfB9csJUKp0jGAY3OVxnUI5mUbn8RVrxxpZi9ld4kODAFSm9F BSQymLtm9h1LdtH8bKA5oxTaXNp9Kg0B0N8LhN9GkaWcwY1T5PE0XE2wPna9Q5mFWiek R2pjSFZCZpFRrMwj5JDxsp9xS3+MG9ObYS1yBi829v4bylWNU0GpcKqA4E+HIe3n9PIy s5wfLOptiOYOf4ElsFKBf/vsrc1KqvaNu4lXeI8ZiZH0/n9GkyUe84fHV0QIJAlxet7z 6I5KV/IqmNsFGoJsXoOyqBfh4lzOoN5c2t2Y/dMn/ledimLWajqdU+b/X1eY/6+aBqrV OTbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LK8pNpnpMmL/0Fx8EftnjOE9dEXjVzkZWUQBwl4spJ4=; b=lZg5CHjXBFIBYkhcs4bM0A1ZNAcPFELwhwaJUJTmeymW/71siJDUghDklReEXb1gxw eGxN7lRTpw2w5z5WVQp7GFvYwWM0fy46DUUleELo75XqpgbtkBt8lJ82HteSu8lxFRyP GLltZT7yFiPo34rM+r72zcJZvAmPKbPNDILGa0kNQaxea2F58u7x6Fu/xmIvTSMGlSaX thDliEON1r4fL10zk6nLW7po3iYt4XitDwmoFn41TXYlJZ8xbYFARZuoNfDk0Bk+lXR2 S8kc3xzv7l+xTZEVGmYZTgxyR0sidveZFz1B+EmJFvh+8CJs3/1WrgoyLWFVo3jfRN9E NokQ== X-Gm-Message-State: APjAAAVF2S15k0G71vLqzYkTBPLT4TinV8kHQfAYsXjQDFKuWjxh9Nmz swkmeBaOWfdt9YQFZU3QSjwDAlwh+y9ztrHI1Wc= X-Google-Smtp-Source: APXvYqzDTJWfeCu5zBSs56A0rkJ3L0jHUjBhAzDSRHPDePE+GkvuMIB4V3+WuAGLDdcQs0iSrG60lUQHCGKtvcUuJFs= X-Received: by 2002:aca:2303:: with SMTP id e3mr28158042oie.112.1563713637250; Sun, 21 Jul 2019 05:53:57 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163513 Archived-At: --000000000000e11ba9058e307302 Content-Type: text/plain; charset="UTF-8" On Sun, Jul 21, 2019 at 7:29 AM Paul Eggert wrote: > > I think we have the following options: > > > > 1. remove pure space entirely > > 2. remove pure space, but leave PURE_P and CHECK_IMPURE as reminders > > to do something about it. > > 3. move pure space to BSS > > 4. xmalloc() pure space, only when needed > > 5. modify pdumper to mark and recognize pure objects > > 6. do nothing and accept the wastefulness > > I suggest (1), since it will result in simpler code. I think we should do (1) for now, since it simplifies the code enough to introduce immutable objects "soon"; but until that time, we waste more space on duplicate objects that we no longer know to be immutable, so cannot merge. I'm attaching a first patch that removes pure space, pinned symbols, pinned objects, but keeps Fpurecopy (for hash consing), and doesn't touch the Lisp codebase. With this patch, I have: -rw-r--r-- 2 pip pip 11102752 Jul 21 12:28 src/emacs.pdmp before: -rw-r--r-- 2 pip pip 10381464 Jul 21 12:29 src/emacs.pdmp However, the (uncompressed) disk space requirement is about the same, since the emacs binary is a lot smaller. I think the next steps are to look at actual live memory usage (which will increase due to the non-duplication of objects, but not by an entire megabyte because some of that data is relocations), and GC performance (no prediction here, it could improve or deteriorate). --000000000000e11ba9058e307302 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Remove-pure-space.patch" Content-Disposition: attachment; filename="0001-Remove-pure-space.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jycyoi560 RnJvbSA5MmVkNWI4NjA0MzYzZmU1NDZhYWNkN2E0YmQzODU2ZjhlYTU2YTRiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaX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92ZSBjb21tZW50IGFib3V0IHB1cmUgc3BhY2UuCihwb2ludGVyX2Fs aWduKTogTW92ZSBkZWZpbml0aW9uIHRvIGF2b2lkIHdhcm5pbmcuCiogc3JjL01ha2VmaWxlLmlu OiBSZW1vdmUgY29tbWVudCBhYm91dCBwdXJlIHNwYWNlLgotLS0KIHNyYy9NYWtlZmlsZS5pbiAg ICB8ICAgMiAtCiBzcmMvYWxsb2MuYyAgICAgICAgfCA1MzcgKysrKy0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiBzcmMvYnVmZmVyLmMgICAgICAgfCAgMTYgKy0KIHNy Yy9jYWxsaW50LmMgICAgICB8ICAgOCArLQogc3JjL2NhdGVnb3J5LmMgICAgIHwgICA0ICstCiBz cmMvY29kaW5nLmMgICAgICAgfCAgMTggKy0KIHNyYy9jb25mX3Bvc3QuaCAgICB8ICAzMyAtLS0K IHNyYy9kYXRhLmMgICAgICAgICB8ICAyOSArLS0KIHNyYy9kYnVzYmluZC5jICAgICB8ICAgNCAr LQogc3JjL2RlcHMubWsgICAgICAgIHwgIDEwICstCiBzcmMvZG9jLmMgICAgICAgICAgfCAgIDMg LQogc3JjL2VtYWNzLW1vZHVsZS5jIHwgIDI2ICstLQogc3JjL2VtYWNzLmMgICAgICAgIHwgICAz IC0KIHNyYy9ldmFsLmMgICAgICAgICB8ICAxMiArLQogc3JjL2ZpbGVpby5jICAgICAgIHwgIDIw ICstCiBzcmMvZm5zLmMgICAgICAgICAgfCAgMjkgKy0tCiBzcmMvZm9udHNldC5jICAgICAgfCAg IDQgKy0KIHNyYy9mcmFtZS5jICAgICAgICB8ICAgMiArLQogc3JjL2ludGVydmFscy5jICAgIHwg ICAyIC0KIHNyYy9qc29uLmMgICAgICAgICB8ICAgNCArLQogc3JjL2tleWJvYXJkLmMgICAgIHwg ICA4ICstCiBzcmMva2V5bWFwLmMgICAgICAgfCAgMzMgKystCiBzcmMvbGlzcC5oICAgICAgICA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b2JqKQogICByZXR1cm4gMDsKIH0KIAotLyoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqCi0JCSAgICAgICBQdXJlIFN0b3JhZ2UgTWFuYWdlbWVudAotICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqLwotCi0vKiBBbGxvY2F0ZSByb29tIGZvciBTSVpFIGJ5dGVzIGZyb20gcHVyZSBMaXNwIHN0 b3JhZ2UgYW5kIHJldHVybiBhCi0gICBwb2ludGVyIHRvIGl0LiAgVFlQRSBpcyB0aGUgTGlzcCB0 eXBlIGZvciB3aGljaCB0aGUgbWVtb3J5IGlzCi0gICBhbGxvY2F0ZWQuICBUWVBFIDwgMCBtZWFu cyBpdCdzIG5vdCB1c2VkIGZvciBhIExpc3Agb2JqZWN0LAotICAgYW5kIHRoYXQgdGhlIHJlc3Vs dCBzaG91bGQgaGF2ZSBhbiBhbGlnbm1lbnQgb2YgLVRZUEUuICAqLwotCi1zdGF0aWMgdm9pZCAq Ci1wdXJlX2FsbG9jIChzaXplX3Qgc2l6ZSwgaW50IHR5cGUpCi17Ci0gIHZvaWQgKnJlc3VsdDsK LQotIGFnYWluOgotICBpZiAodHlwZSA+PSAwKQotICAgIHsKLSAgICAgIC8qIEFsbG9jYXRlIHNw YWNlIGZvciBhIExpc3Agb2JqZWN0IGZyb20gdGhlIGJlZ2lubmluZyBvZiB0aGUgZnJlZQotCSBz cGFjZSB3aXRoIHRha2luZyBhY2NvdW50IG9mIGFsaWdubWVudC4gICovCi0gICAgICByZXN1bHQg PSBwb2ludGVyX2FsaWduIChwdXJlYmVnICsgcHVyZV9ieXRlc191c2VkX2xpc3AsIExJU1BfQUxJ R05NRU5UKTsKLSAgICAgIHB1cmVfYnl0ZXNfdXNlZF9saXNwID0gKChjaGFyICopcmVzdWx0IC0g KGNoYXIgKilwdXJlYmVnKS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kKLSAgICB7Ci0gICAgICBzdHJ1Y3QgTGlzcF9IYXNoX1RhYmxlICp0 YWJsZSA9IFhIQVNIX1RBQkxFIChvYmopOwotICAgICAgLyogRG8gbm90IHB1cmlmeSBoYXNoIHRh YmxlcyB3aGljaCBoYXZlbid0IGJlZW4gZGVmaW5lZCB3aXRoCi0gICAgICAgICA6cHVyZWNvcHkg YXMgbm9uLW5pbCBvciBhcmUgd2VhayAtIHRoZXkgYXJlbid0IGd1YXJhbnRlZWQgdG8KLSAgICAg ICAgIG5vdCBjaGFuZ2UuICAqLwotICAgICAgaWYgKCFOSUxQICh0YWJsZS0+d2VhaykgfHwgIXRh YmxlLT5wdXJlY29weSkKLSAgICAgICAgewotICAgICAgICAgIC8qIEluc3RlYWQsIGFkZCB0aGUg aGFzaCB0YWJsZSB0byB0aGUgbGlzdCBvZiBwaW5uZWQgb2JqZWN0cywKLSAgICAgICAgICAgICBz byB0aGF0IGl0IHdpbGwgYmUgbWFya2VkIGR1cmluZyBHQy4gICovCi0gICAgICAgICAgc3RydWN0 IHBpbm5lZF9vYmplY3QgKm8gPSB4bWFsbG9jIChzaXplb2YgKm8pOwotICAgICAgICAgIG8tPm9i amVjdCA9IG9iajsKLSAgICAgICAgICBvLT5uZXh0ID0gcGlubmVkX29iamVjdHM7Ci0gICAgICAg ICAgcGlubmVkX29iamVjdHMgPSBvOwotICAgICAgICAgIHJldHVybiBvYmo7IC8qIERvbid0IGhh c2ggY29ucyBpdC4gICovCi0gICAgICAgIH0KLQotICAgICAgc3RydWN0IExpc3BfSGFzaF9UYWJs ZSAqaCA9IHB1cmVjb3B5X2hhc2hfdGFibGUgKHRhYmxlKTsKLSAgICAgIFhTRVRfSEFTSF9UQUJM RSAob2JqLCBoKTsKLSAgICB9Ci0gIGVsc2UgaWYgKENPTVBJTEVEUCAob2JqKSB8fCBWRUNUT1JQ IChvYmopIHx8IFJFQ09SRFAgKG9iaikpCi0gICAgewotICAgICAgc3RydWN0IExpc3BfVmVjdG9y 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