emacs-diffs
[Top][All Lists]
Advanced

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

scratch/igc 790e99b2b83 03/78: Make it build again


From: Gerd Moellmann
Subject: scratch/igc 790e99b2b83 03/78: Make it build again
Date: Fri, 14 Jun 2024 04:27:10 -0400 (EDT)

branch: scratch/igc
commit 790e99b2b83a1f2ed68e28c1507d66e4ec993f5c
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    Make it build again
---
 src/igc.c | 94 ++++++++++++++++++---------------------------------------------
 1 file changed, 27 insertions(+), 67 deletions(-)

diff --git a/src/igc.c b/src/igc.c
index e27982d1e81..1701dd33557 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -2186,12 +2186,6 @@ root_create_thread (struct igc_thread_list *t)
   register_root (gc, root, cold, NULL, true);
 }
 
-void
-igc_on_pdump_loaded (void *start, void *end)
-{
-  root_create_exact (global_igc, start, end, scan_dump);
-}
-
 void
 igc_on_grow_specpdl (void)
 {
@@ -3610,6 +3604,9 @@ be either an integer or a float.  The default value is 
0.05, i.e.
 50 milliseconds.  Negative values and values that are not numbers
 are handled as if they were the default value.  */);
   Vigc_step_interval = make_float (0.05);
+}
+
+
 /***********************************************************************
                            Copying the dump
  ***********************************************************************/
@@ -3918,6 +3915,18 @@ mirror_ptr_vec (struct igc_mirror *m, void *client)
   emacs_abort ();
 }
 
+static void
+mirror_obj_vec (struct igc_mirror *m, void *client)
+{
+  emacs_abort ();
+}
+
+static void
+mirror_handler (struct igc_mirror *m, void *client)
+{
+  emacs_abort ();
+}
+
 static void
 mirror_weak_ref (struct igc_mirror *m, struct Lisp_Weak_Ref *wref)
 {
@@ -4102,12 +4111,6 @@ mirror_user_ptr (struct igc_mirror *m, struct 
Lisp_User_Ptr *p)
   emacs_abort ();
 }
 
-static void
-mirror_handler (struct igc_mirror *m, struct handler *h)
-{
-  emacs_abort ();
-}
-
 static void
 mirror_thread (struct igc_mirror *m, struct thread_state *s)
 {
@@ -4273,7 +4276,7 @@ mirror_vector (struct igc_mirror *m, struct Lisp_Vector 
*v)
     case PVEC_TS_NODE:
     case PVEC_TS_PARSER:
     case PVEC_SQLITE:
-    case PVEC_COMPILED:
+    case PVEC_CLOSURE:
     case PVEC_RECORD:
     case PVEC_OTHER:
 #ifdef IN_MY_FORK
@@ -4301,6 +4304,14 @@ mirror_obj (struct igc_mirror *m, void *base)
     case IGC_OBJ_LAST:
       emacs_abort ();
 
+    case IGC_OBJ_OBJ_VEC:
+      mirror_obj_vec (m, client);
+      break;
+
+    case IGC_OBJ_HANDLER:
+      mirror_handler (m, client);
+      break;
+
     case IGC_OBJ_PTR_VEC:
       mirror_ptr_vec (m, client);
       break;
@@ -4392,63 +4403,12 @@ mirror_dump (void)
     print_mirror_stats (&m);
 }
 
-struct register_pdump_roots_ctx
-{
-  void *hot_start;  /* start of hot section in pdump */
-  void *hot_end;    /* end of hot section in pdump */
-  void *root_start; /* start (or NULL) of current root */
-  void *root_end;   /* end (or NULL) of current root */
-};
-
-/* Try to combine adjacent objects into one root.  Naively creating a
-   separate root for each object seems to run into serious efficiency
-   problems. */
-static void
-register_pdump_roots_1 (void *start, void *closure)
-{
-  struct igc_header *h = start;
-  void *end = (char *)start + to_bytes (h->nwords);
-  struct register_pdump_roots_ctx *ctx = closure;
-  if (start < ctx->hot_start || ctx->hot_end <= start)
-    return;
-  if (ctx->root_end == start) /* adjacent objects? */
-    {
-      ctx->root_end = end; /* combine them */
-    }
-  else
-    {
-      if (ctx->root_start != NULL)
-       {
-         root_create_exact (global_igc, ctx->root_start, ctx->root_end,
-                            dflt_scanx);
-       }
-      ctx->root_start = start;
-      ctx->root_end = end;
-    }
-}
-
-static void
-register_pdump_roots (void *start, void *end)
-{
-  struct register_pdump_roots_ctx ctx = {
-    .hot_start = start,
-    .hot_end = end,
-    .root_start = NULL,
-    .root_end = NULL,
-  };
-  pdumper_visit_object_starts (register_pdump_roots_1, &ctx);
-  if (ctx.root_start != NULL)
-    {
-      root_create_exact (global_igc, ctx.root_start, ctx.root_end,
-                        dflt_scanx);
-    }
-}
-
 void
 igc_on_pdump_loaded (void *start, void *end)
 {
-  // root_create_ambig (global_igc, start, end);
-  register_pdump_roots (start, end);
+  /* FIXME: Remove root once dump has been copied. */
+  root_create_exact (global_igc, start, end, scan_dump);
+
   specpdl_ref count = igc_park_arena ();
   mirror_dump ();
   unbind_to (count, Qnil);



reply via email to

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