emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPS: Please check if scratch/igc builds with native compilation


From: Helmut Eller
Subject: Re: MPS: Please check if scratch/igc builds with native compilation
Date: Wed, 22 May 2024 07:43:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

> I've checked that d_reloc is indeed scanned by fix_comp_unit. The
> check gives me reasonable confidence that this "should work". But as
> an alternative, I also made all the things like d_reloc in the .elns
> ambiguous roots, so that they cannot possibly be moved, if all works as
> expected.

Registering the dump as root happens rather late.  The relocation code
allocates a hash table and stores a reference to it in
comp_u->lambda_gc_guard_h.  By that time the dump should already be a
root.  Can we register the dump earlier?  AFAIU, the dumper writes zeros
in the cells for to-be-relocated references and the scan code will
ignore them.  So I think this could work:

diff --git a/src/pdumper.c b/src/pdumper.c
index b039e375c1f..39484a16c95 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5958,6 +5958,7 @@ pdumper_load (const char *dump_filename, char *argv0)
        & ~(DUMP_ALIGNMENT - 1));
   void *hot_start = (void *) (dump_base + aligned_header_size);
   void *hot_end = (void *) (dump_base + header->discardable_start);
+  igc_on_pdump_loaded (hot_start, hot_end);
 #endif
 
   dump_do_all_dump_reloc_for_phase (header, dump_base, EARLY_RELOCS);
@@ -6002,10 +6003,6 @@ pdumper_load (const char *dump_filename, char *argv0)
   dump_private.load_time = timespectod (load_timespec);
   dump_private.dump_filename = dump_filename_copy;
 
-# ifdef HAVE_MPS
-  igc_on_pdump_loaded (hot_start, hot_end);
-# endif
-
  out:
   for (int i = 0; i < ARRAYELTS (sections); ++i)
     dump_mmap_release (&sections[i]);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]