From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#46881: 28.0.50; pdumper dumping causes way too many syscalls Date: Fri, 5 Mar 2021 02:30:13 +0000 Message-ID: References: <83r1kw6b06.fsf@gnu.org> <90e99fc5-280d-63bb-9bc4-3efe89b9f9e2@dancol.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25335"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46881@debbugs.gnu.org, Paul Eggert To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 05 03:33:04 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lI0H1-0006TL-Sw for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 03:33:03 +0100 Original-Received: from localhost ([::1]:57076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lI0H0-0006IP-SQ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Mar 2021 21:33:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lI0F4-0005Wf-Uc for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 21:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lI0F3-0005B3-Px for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 21:31:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lI0F3-0007I1-N3 for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 21:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Mar 2021 02:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46881 X-GNU-PR-Package: emacs Original-Received: via spool by 46881-submit@debbugs.gnu.org id=B46881.161491145728010 (code B ref 46881); Fri, 05 Mar 2021 02:31:01 +0000 Original-Received: (at 46881) by debbugs.gnu.org; 5 Mar 2021 02:30:57 +0000 Original-Received: from localhost ([127.0.0.1]:60702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lI0Ez-0007Hi-8B for submit@debbugs.gnu.org; Thu, 04 Mar 2021 21:30:57 -0500 Original-Received: from mail-ot1-f54.google.com ([209.85.210.54]:43412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lI0Ex-0007HV-DV for 46881@debbugs.gnu.org; Thu, 04 Mar 2021 21:30:56 -0500 Original-Received: by mail-ot1-f54.google.com with SMTP id v12so363540ott.10 for <46881@debbugs.gnu.org>; Thu, 04 Mar 2021 18:30:55 -0800 (PST) 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=Yz+5IQwz1PHNAgvclmhCEIHgyfGRA67qmVd0f2CpqfY=; b=aQGhbbaYcIu6PXyoVeiOaBgqs0O9MaZcBo7eRMscwwfCxVMYj+Q0uZxFSu9sD5nRkR l+tfV3OqPlX+uLkn0ANbHbESCePX4Y0Gj9UStdPAnOx+lZvHquco3e4O5HfgDYvl4JHh 7eujLJn9FrJBBU9iYL9KOG++UB27bxaGKzMr/OMyu0PvY+tE8/lcFZr0NrUnO/lI0Y4T omd/5hs4jOZbQpDU5kFST5Plx/a2f3RFYeZes+MBT8Em7EAtkP3Wh+6JmWcVPvezOjMh kF/97XiZmpSi7ZGHMCYl0P8Na5oJtHYN4NZKmGs7MYPC7DusLL05lyFEKpugir9Hu14c 0XzQ== 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=Yz+5IQwz1PHNAgvclmhCEIHgyfGRA67qmVd0f2CpqfY=; b=MGuVYQ/vxXa9gzx0pGl38dL0oZSoRFMOEIxgkVza26uDzAPiZwjQZA26IsB16FF51L IpqL3ht2+42PnSPMiOiIc8BsWtno8YqiyxhjSMWySkkAfF8/qTFaK/w/pRqh6XsVn1WV CsCcIJFBBw2kbryP1bi8wk3+mEpl+XqFwlxqjypHHjTM8kP+oD+4BCkSfdhRTvQo496C dfBVFNMNeq62csS8wFZcx0jZzAWcdMu2CWsVPDQnzMfand3hreyPkHuPmreYtn0/UY3x 6aVmF5nxrLs56OHTaqYDeKG3ZHONQtfalF27mUwhXk8ltj7W4jLqPTWm9o5Ax9b20BQn VyLQ== X-Gm-Message-State: AOAM533LU+s0syYr9oAO0FAkAk4MuoysLsVbMgQji7NVm7pMQhv1W91Q NYONz46rxDs1ybcC07k5bQfdBj8RmM9lxgyoBt4= X-Google-Smtp-Source: ABdhPJwIQH7cO+h2H+YYei8PWyPiS1L921F16Fu5I/aqTG9jzxcPhYtm2585s40h7ZZryU0sTAknPMQfYfgTorNTIw0= X-Received: by 2002:a05:6830:1e51:: with SMTP id e17mr6132947otj.292.1614911449852; Thu, 04 Mar 2021 18:30:49 -0800 (PST) In-Reply-To: <90e99fc5-280d-63bb-9bc4-3efe89b9f9e2@dancol.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201489 Archived-At: On Thu, Mar 4, 2021 at 10:26 PM Daniel Colascione wrote: > On 3/3/21 12:51 AM, Eli Zaretskii wrote: > > Daniel, Paul: any comments? In particular, is it safe to allocate > > large amounts of memory off the heap while dumping? A couple of > > places in pdumper.c says some parts of code should call malloc. > > It looks fine, but wouldn't dumping to a FILE* (with internal buffering) > do the same basic thing in a simpler way? I initially set out to do that, but decided against it. We don't just write sequentially (when FILE I/O helps, a little), we also have the seek-and-fixup phase, and it didn't seem any simpler at that point.. > There aren't any particular > constraints on the environment _during_ the dump: we even make new lisp > objects. It's when loading the dump, early in initialization, that you > have to be careful. Thanks! Pip