From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.bugs Subject: bug#56988: Add call-interactively to "never optimize" list for native compilation Date: Fri, 5 Aug 2022 08:13:26 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006a4a1905e57d6592" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34389"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56988@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 05 14:14:24 2022 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 1oJwDf-0008lP-3Z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 14:14:23 +0200 Original-Received: from localhost ([::1]:32854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJwDd-0004Jn-Od for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 08:14:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJwDK-0003uC-MU for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 08:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38533) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJwDK-0004N9-Cy for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 08:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJwDK-0005wm-8E for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 08:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lynn Winebarger Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Aug 2022 12:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56988 X-GNU-PR-Package: emacs Original-Received: via spool by 56988-submit@debbugs.gnu.org id=B56988.165970162722832 (code B ref 56988); Fri, 05 Aug 2022 12:14:02 +0000 Original-Received: (at 56988) by debbugs.gnu.org; 5 Aug 2022 12:13:47 +0000 Original-Received: from localhost ([127.0.0.1]:56515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJwD4-0005w5-UR for submit@debbugs.gnu.org; Fri, 05 Aug 2022 08:13:47 -0400 Original-Received: from mail-pj1-f54.google.com ([209.85.216.54]:54076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJwD2-0005vk-K4 for 56988@debbugs.gnu.org; Fri, 05 Aug 2022 08:13:45 -0400 Original-Received: by mail-pj1-f54.google.com with SMTP id pm17so2584542pjb.3 for <56988@debbugs.gnu.org>; Fri, 05 Aug 2022 05:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=4A6RecBL3OHh7BwxN5Yug9KVgF0n0toq9szTDbOgbpc=; b=H7JxruwVJwbGOeS8P+tfvlIQB19pEGR1uHc1R63u9GsAjBFYPKdKlyrgky0ymcSwf/ f1HUW7cN++pjt6fqnTgimC0NRvY1mXTQtLCOcpuSUTOwR3VNqys2QXXjhJKhRbgSuAYs fDLZI5P1DJ/TUT2mG2wbE4wtuhmO74QtDx0xTO2f6JmLJnDSUMvQDpuIMooDuv3PscHc n7JehbEyRzzoeKGOPStj6UtH3dDNqGF7+c0MLc/70QO2zFF69xGUzl+c8JAytKoBCa+G 9jzZ84LbgLxH0iKTdsCD5RWj/ZlcKsEQxNX0gQxNdasVozCH9t48vHmkfvJNtzRA5t1d aX+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=4A6RecBL3OHh7BwxN5Yug9KVgF0n0toq9szTDbOgbpc=; b=cAGljEdVWP+ha62RwuL93yyzqRD5adGyx05TNTL/CUAoGCCKUTXuMcCiCWW+8jqnRG n3rkWBazV/hYuVb0xWA9yWBzxHoOQRXDO+4jlN5Ajgs4V5zcbyhgwoWLdiGbsOvkYbom JmNP7KnoZJzBVHrk4xIbNhDPo3KMVI9iRRxpalVA+2OuQdSoIRlrnn7s4qfXE/hd7Idn VAjpuL6Xw8u4k48XCmTZdwFmTvoLick34Q4AttLoSESdR1uOMHJGCDkbO1dUVECwxn70 3Q7khmHumvU/rWVwpMcmtxO7e30HxJwKZlshvfLRrh8HIT4b42OBeB1ckfWjEEimRiAg xUZA== X-Gm-Message-State: ACgBeo3XJ8hioyA0Dd6yIXy53J7cofdt88FRxP0ftuaGBu9ODgzTQr4i pVjQOreNQWZvcE9BABojAfVZuigtHIORRPCpv6w= X-Google-Smtp-Source: AA6agR5tblex5Xb23d5qcUIcrTd7Z5D73Hu6F7tR9uFfiuvkCP/Zn4PuhvWZ8FDBYEwTqePsnvZ5HHCWKnqWGxptQBA= X-Received: by 2002:a17:902:900c:b0:16d:28ad:29e1 with SMTP id a12-20020a170902900c00b0016d28ad29e1mr6419055plp.93.1659701618689; Fri, 05 Aug 2022 05:13:38 -0700 (PDT) In-Reply-To: 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:238884 Archived-At: --0000000000006a4a1905e57d6592 Content-Type: text/plain; charset="UTF-8" On Fri, Aug 5, 2022, 6:07 AM Andrea Corallo wrote: > Lynn Winebarger writes: > > > Version 28.1: > > Since dumping an Emacs with ~500 core libraries in addition to the 100+ > from loadup (596 NCUs in the dump), I noticed > > huge numbers of async jobs compiling trampolines for > call-interactively. Adding call-interactively - and > > funcall-interactively for good measure - to the customization variable > for functions to never optimize, as well as to the > > hard-coded list in advice--add-function, then recompiling and dumping > resolved the issue. > > Hi Lynn, > > I think we want to keep on optimizing `call-interactively' as changing > this policy this could have a negative performance impact in certain > scenarios. > > Perhaps should be investigated why on the process you are engineering > this is happening, and modify it so that only one trampoline is > compiled. Isn't call-interactively only used in the context of requesting user input? That would seem unlikely to benefit from optimization. Something in one those additional core libraries being dumped is adding advice to call-interactively. One of the ways it started is by opening customize on a group that autoloads a library that hasn't been native compiled. That starts the async process for the compiler. This will happen just running emacs with whatever library is advising call-interactively in a problematic way in the dump. It's not part of my build process unless I use one of those builds with the additional libraries as the compiler. I'm noting it as a bug because it will bite anyone who includes these additional libraries in the dump as a regular user, not because it impacts my build process. I know that's not frequently the case now, but it should be eventually. Lynn --0000000000006a4a1905e57d6592 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Aug 5, 2022, 6:07 AM Andrea Corallo <akrl@sdf.org> wrote:
Lynn Winebarger <owinebar@gmail.com> writes:

> Version 28.1:
> Since dumping an Emacs with ~500 core libraries in addition to the 100= + from loadup (596 NCUs in the dump), I noticed
> huge numbers of async jobs compiling trampolines for call-interactivel= y.=C2=A0 Adding call-interactively - and
> funcall-interactively for good measure - to the customization variable= for functions to never optimize, as well as to the
> hard-coded list in advice--add-function, then recompiling and dumping = resolved the issue.

Hi Lynn,

I think we want to keep on optimizing `call-interactively' as changing<= br> this policy this could have a negative performance impact in certain
scenarios.

Perhaps should be investigated why on the process you are engineering
this is happening, and modify it so that only one trampoline is
compiled.

Isn't call-interactively only used in the context of requesting us= er input?=C2=A0 That would seem unlikely to benefit from optimization.
Something in one those additional core libraries being d= umped is adding advice to call-interactively.=C2=A0 One of the ways it star= ted is by opening customize on a group that autoloads a library that hasn&#= 39;t been native compiled.=C2=A0 That starts the async process for the comp= iler.=C2=A0 This will happen just running emacs with whatever library is ad= vising call-interactively in a problematic way in the dump.=C2=A0 It's = not part of my build process unless I use one of those builds with the addi= tional libraries as the compiler.=C2=A0=C2=A0
I'= m noting it as a bug because it will bite anyone who includes these additio= nal libraries in the dump as a regular user, not because it impacts my buil= d process.=C2=A0 I know that's not frequently the case now, but it shou= ld be eventually.

Lynn

--0000000000006a4a1905e57d6592--