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: Tue, 2 Mar 2021 20:33:42 +0000 Message-ID: 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="29198"; mail-complaints-to="usenet@ciao.gmane.io" To: 46881@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 02 21:35:11 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 1lHBjZ-0007NX-Le for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 21:35:09 +0100 Original-Received: from localhost ([::1]:52654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHBjY-0006Qx-Bn for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 15:35:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHBjS-0006Qp-3J for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 15:35:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHBjR-0005TF-SR for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 15:35:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHBjR-0004Zp-Pi for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 15:35: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: Tue, 02 Mar 2021 20:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46881 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161471726817549 (code B ref -1); Tue, 02 Mar 2021 20:35:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Mar 2021 20:34:28 +0000 Original-Received: from localhost ([127.0.0.1]:54332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHBiu-0004Yz-I9 for submit@debbugs.gnu.org; Tue, 02 Mar 2021 15:34:28 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHBiq-0004Yn-Kt for submit@debbugs.gnu.org; Tue, 02 Mar 2021 15:34:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHBiq-0006PU-Du for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 15:34:24 -0500 Original-Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:37839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHBil-0005Q0-Ss for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 15:34:24 -0500 Original-Received: by mail-ot1-x32f.google.com with SMTP id g8so17697918otk.4 for ; Tue, 02 Mar 2021 12:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=5b9IwmcF3bL0NiSEoxEpASmYQ/yzhyOmJN0qSxpQJWw=; b=BJfWl/Ra5v1psfnx4Oys7EkG28sHuSAeXhkjotuARlPH/u8DdiCBDefCVyCKH6C14q /1r0sPKDWZA7SO7qHmhqeLhwSAC/EdTwFqNU79W1C6K9d7fntEuN8280SvFJroTq+Ufh mKGj2fXAbRz1dqbFvHd4gsPQOtk/5sB6XBDtiqEP7FBW2KeaZEZ5X1jJ951NsMjv3+tg 5LJEAK92qK6cgotj8G36e8X6ifD0pskYVJPMu3isMOFMK4srPigyveO9k+ro1D5h6rzx jDKGq0pX84AGVf5DZIuVzbQ7mndEgLilSZuw1pVd7KTOP1g37sgp/tTrZDVGr5S+x3mv i89Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5b9IwmcF3bL0NiSEoxEpASmYQ/yzhyOmJN0qSxpQJWw=; b=N1rpogs53ZQPaSMwnYCxtSARWfMh+01gVHsaVNmf8qGAohoyk6Ze0gnGpz3Ob7rJuo tUDHpnkO1TduGPFqSfT1Od1JhEbX1mQX2VzFxiejAiUyXYyQbMdGQKAuHSXEwYz0aFMz QqEegOYYABFy56EmKZTDqEiP1pDSf2tagU5iGmuLmH0jmX+lJUvBnmD/Xy9EaJJQqbdy 2UfpYeL5ZrP0QgdmGmebvQZLl6BLsHRu277eL+QICsBdf2pJ4Ea0Nm1fWwsJ22kX3xhp 2IQcBLzmAuOB9YtqOijSD8ssCi4iCGtf10nLiGrXg8BR3AcgO+3V91mNQ1Zj076Sai6P aW0Q== X-Gm-Message-State: AOAM531+fU3Al4eXJLePou897P2Vw3ulkOaHNNcp7I89VjpID7qDNfCV 2qWq69Kl2o9v8BxJM7PjXwAs5xQciaZauBXxhlVpiRZAvxw= X-Google-Smtp-Source: ABdhPJx0ANq9SgORjfvFY9p6A0UFIA+L4KtWywysakl68tnr180nyHLuZN6ottAsi2/tK8xtrFAgfiPUKjnAcH0vB40= X-Received: by 2002:a9d:131:: with SMTP id 46mr19269769otu.287.1614717258619; Tue, 02 Mar 2021 12:34:18 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::32f; envelope-from=pipcet@gmail.com; helo=mail-ot1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:201238 Archived-At: Playing around with the WebAssembly port, I noticed that pdumper, in creating the dump file, makes way too many syscalls: it uses emacs_write(), not fwrite(), so these calls translate to actual syscalls and context switches. On immature systems (or in special circumstances like a device mounted synchronously), they might actually cause a hardware write for each syscall, which would wear out flash quickly and be generally wasteful. I've looked into the problem, and it seems easy to solve and worth it in terms of debuggability and performance. Patch will be attached once this has a bug number.