GNU bug report logs - #44238
28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds

Previous Next

Package: emacs;

Reported by: Andrew Whatson <whatson <at> gmail.com>

Date: Mon, 26 Oct 2020 12:22:01 UTC

Severity: normal

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44238 in the body.
You can then email your comments to 44238 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Mon, 26 Oct 2020 12:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Whatson <whatson <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 26 Oct 2020 12:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrew Whatson <whatson <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
Date: Mon, 26 Oct 2020 22:20:51 +1000
Hi Andrea,

In the spirit of pre-compiling as much as possible, would it make
sense to pre-compile all the trampolines when preparing a FULL_AOT
build?

Cheers,
Andrew




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Mon, 26 Oct 2020 13:41:02 GMT) Full text and rfc822 format available.

Message #8 received at 44238 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 44238 <at> debbugs.gnu.org
Subject: Re: bug#44238: 28.0.50; [feature/native-comp] Build trampolines for
 FULL_AOT builds
Date: Mon, 26 Oct 2020 13:40:48 +0000
Andrew Whatson <whatson <at> gmail.com> writes:

> Hi Andrea,
>
> In the spirit of pre-compiling as much as possible, would it make
> sense to pre-compile all the trampolines when preparing a FULL_AOT
> build?

Hi Andrew,

IMO is not worth compiling almost 1500 files for really using just a few
of them.  Also the compilation is realtivelly quick (~0.2s each on my
machine), I guess the most is GCC/GAS startup time.  Indeed this time is
payed only once when the primitive is redefined the first time.

That said if you want to experiment I think something like this should
do the job:

(mapatoms (λ (s)    
            (when (subr-primitive-p (symbol-function s))
              (comp-trampoline-compile s))))

Ciao!

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Fri, 06 Nov 2020 20:57:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: Andrew Whatson <whatson <at> gmail.com>, 44238 <at> debbugs.gnu.org
Subject: Re: bug#44238: 28.0.50; [feature/native-comp] Build trampolines for
 FULL_AOT builds
Date: Fri, 06 Nov 2020 20:56:26 +0000
Hi Andrew,

as I mentioned I think is really not worth, I'd be for closing
this. WDYT about?

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Fri, 06 Nov 2020 20:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Fri, 06 Nov 2020 22:44:02 GMT) Full text and rfc822 format available.

Message #17 received at 44238 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Whatson <whatson <at> gmail.com>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: 44238 <at> debbugs.gnu.org
Subject: Re: bug#44238: 28.0.50; [feature/native-comp] Build trampolines for
 FULL_AOT builds
Date: Sat, 7 Nov 2020 08:43:30 +1000
Andrea Corallo <akrl <at> sdf.org> wrote:

> as I mentioned I think is really not worth, I'd be for closing
> this. WDYT about?

Sorry for the delay, I have been (slowly) working on a patch to build
the trampolines as part of a NATIVE_FULL_AOT build.  Adding a step to
the Makefile was easy, but all the trampolines end up in
~/.emacs.d/eln-cache instead of the build directory.  I'll invest some
more time over the weekend to get this working.

I understand that these are relatively cheap to build, but my
motivation is that when building binary packages for wider
distribution, any work ahead-of-time will pay off many times over.
I'd at least like to gather some data on the impact to build times and
package size from pre-building the trampolines before closing this
issue, if you don't strongly disagree.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Fri, 06 Nov 2020 22:54:01 GMT) Full text and rfc822 format available.

Message #20 received at 44238 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 44238 <at> debbugs.gnu.org
Subject: Re: bug#44238: 28.0.50; [feature/native-comp] Build trampolines for
 FULL_AOT builds
Date: Fri, 06 Nov 2020 22:53:34 +0000
Andrew Whatson <whatson <at> gmail.com> writes:

> Andrea Corallo <akrl <at> sdf.org> wrote:
>
>> as I mentioned I think is really not worth, I'd be for closing
>> this. WDYT about?
>
> Sorry for the delay, I have been (slowly) working on a patch to build
> the trampolines as part of a NATIVE_FULL_AOT build.  Adding a step to
> the Makefile was easy, but all the trampolines end up in
> ~/.emacs.d/eln-cache instead of the build directory.  I'll invest some
> more time over the weekend to get this working.
>
> I understand that these are relatively cheap to build, but my
> motivation is that when building binary packages for wider
> distribution, any work ahead-of-time will pay off many times over.
> I'd at least like to gather some data on the impact to build times and
> package size from pre-building the trampolines before closing this
> issue, if you don't strongly disagree.

Sure take your time.

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Fri, 27 Aug 2021 17:25:01 GMT) Full text and rfc822 format available.

Message #23 received at 44238 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 44238 <at> debbugs.gnu.org, Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#44238: 28.0.50; [feature/native-comp] Build trampolines for
 FULL_AOT builds
Date: Fri, 27 Aug 2021 19:24:27 +0200
Andrew Whatson <whatson <at> gmail.com> writes:

> Sorry for the delay, I have been (slowly) working on a patch to build
> the trampolines as part of a NATIVE_FULL_AOT build.  Adding a step to
> the Makefile was easy, but all the trampolines end up in
> ~/.emacs.d/eln-cache instead of the build directory.  I'll invest some
> more time over the weekend to get this working.
>
> I understand that these are relatively cheap to build, but my
> motivation is that when building binary packages for wider
> distribution, any work ahead-of-time will pay off many times over.
> I'd at least like to gather some data on the impact to build times and
> package size from pre-building the trampolines before closing this
> issue, if you don't strongly disagree.

This was half a year ago -- did you make any progress in this area?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Sun, 29 Aug 2021 21:24:02 GMT) Full text and rfc822 format available.

Message #26 received at 44238 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Whatson <whatson <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44238 <at> debbugs.gnu.org, Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#44238: 28.0.50; [feature/native-comp] Build trampolines for
 FULL_AOT builds
Date: Mon, 30 Aug 2021 07:23:08 +1000
On Sat, 28 Aug 2021 at 03:24, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
> > Sorry for the delay, I have been (slowly) working on a patch to build
> > the trampolines as part of a NATIVE_FULL_AOT build.  Adding a step to
> > the Makefile was easy, but all the trampolines end up in
> > ~/.emacs.d/eln-cache instead of the build directory.  I'll invest some
> > more time over the weekend to get this working.
> >
> > I understand that these are relatively cheap to build, but my
> > motivation is that when building binary packages for wider
> > distribution, any work ahead-of-time will pay off many times over.
> > I'd at least like to gather some data on the impact to build times and
> > package size from pre-building the trampolines before closing this
> > issue, if you don't strongly disagree.
>
> This was half a year ago -- did you make any progress in this area?

After playing with it some more, I have to agree with Andrea that
pre-compiling trampolines seems not really worth it.  My reasonably
heavy emacs config needs only 37 trampolines, which take up 400K on
disk.  It's difficult to justify building ~1500 trampolines to ship
~15M of binaries which would never be used.

I also didn't come up with a satisfactory Makefile patch, so at this
point probably best to close the ticket.

Cheers,
Andrew




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44238; Package emacs. (Sun, 29 Aug 2021 21:27:02 GMT) Full text and rfc822 format available.

Message #29 received at 44238 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 44238 <at> debbugs.gnu.org, Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#44238: 28.0.50; [feature/native-comp] Build trampolines for
 FULL_AOT builds
Date: Sun, 29 Aug 2021 23:26:07 +0200
Andrew Whatson <whatson <at> gmail.com> writes:

> After playing with it some more, I have to agree with Andrea that
> pre-compiling trampolines seems not really worth it.  My reasonably
> heavy emacs config needs only 37 trampolines, which take up 400K on
> disk.  It's difficult to justify building ~1500 trampolines to ship
> ~15M of binaries which would never be used.

Yup.

> I also didn't come up with a satisfactory Makefile patch, so at this
> point probably best to close the ticket.

OK; closing this report, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 44238 <at> debbugs.gnu.org and Andrew Whatson <whatson <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 29 Aug 2021 21:27:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Sep 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.