all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#57035: Support for site-load.el in native-compile dumping
@ 2022-08-07 12:15 Lynn Winebarger
  2022-08-07 12:55 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lynn Winebarger @ 2022-08-07 12:15 UTC (permalink / raw)
  To: 57035

[-- Attachment #1: Type: text/plain, Size: 2458 bytes --]

Version 28.1+
By experimentation I've found the following issues are all that prevent
dumping with large numbers of pre-loaded native compiled units.  The
improvement in start-up performance versus requiring the same libraries in
a .emacs file is ridiculous, even with all libraries pre-compiled.  The
same fixes would provide support for user's construction of personal dump
files.
+ Add additional build stage so a compile phase that only loads loadup is
produced first, with a following stage to compile all the libraries loaded
by site-load.  Originally suggested by Stefan Monnier, it appears
absolutely necessary.  Most libraries not 8n loadup implicitly assume those
libraries are in the compile-time environment.
+. Add a flag variable to turn off the docstring hack in lead.c once loadup
has been processed (or eliminate the hack entirely).
+ Also turn off the prohibition on implicit loading while in dump mode
based on that flag variable.  The file dependencies of site-load can be
determined using load-history once the baseline (loadup only) dump has been
constructed.
+ Turn off purification flag before loading site-load, or fix bugs in
purecopy/pure_alloc (elimination of pure space counts as a bug fix).  Note
that when I've selectively turned off the purify flag in site-load to avoid
purecopy bugs, the process would reach the stage of calling pdump, but that
call would hang indefinitely (I let it go for a couple of hours the first
time, and it just burned cpu cycles without any change in memory use).
+ Enable the standard load path before loading site-load.
+ Make all_loaded_comp_units_h visible as a lisp variable, so loadup can
explicitly fix up all loaded comp units, whether there is a symbol bound to
a subr in that unit or not.
+ Make it possible to cleanly turn off further asynchronous compilation.  I
currently set native-comp-deferred-compilation-deny-list to '("/.*/"), but
I've still seen an occasional job running the compiler on some subr.
+ Ensure the compiler is run using the pdmp file constructed just from
loadup.  It will be impossible to support or debug compiling with arbitrary
compile-time environments.  I've already encountered an issue from having
call-interactive somehow advise itself when compiling with only additional
core emacs libraries in the dump.

I think that covers all the issues I dealt with.  If my employer allows I
can donate code to fix the purecopy issues in versions prior to 29.

Lynn

[-- Attachment #2: Type: text/html, Size: 2870 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-07 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-07 12:15 bug#57035: Support for site-load.el in native-compile dumping Lynn Winebarger
2022-08-07 12:55 ` Lars Ingebrigtsen
2022-08-07 13:16   ` Lynn Winebarger

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.