[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/igc 62b52390cef 14/18: Dump igc object starts to file
From: |
Gerd Moellmann |
Subject: |
scratch/igc 62b52390cef 14/18: Dump igc object starts to file |
Date: |
Tue, 14 May 2024 04:02:09 -0400 (EDT) |
branch: scratch/igc
commit 62b52390cefccb3f398be8ad20a16a7810c520d5
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Dump igc object starts to file
---
src/pdumper.c | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/src/pdumper.c b/src/pdumper.c
index 79465c19811..ce7281e35e7 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -371,6 +371,10 @@ struct dump_header
correctness. */
struct dump_table_locator object_starts;
+# ifdef HAVE_MPS
+ struct dump_table_locator igc_object_starts;
+# endif
+
/* Relocation table for Emacs; each entry is a struct
emacs_reloc. */
struct dump_table_locator emacs_relocs;
@@ -3908,6 +3912,28 @@ dump_emit_dump_reloc (struct dump_context *ctx,
Lisp_Object lreloc)
ctx->number_discardable_relocations += 1;
}
+#ifdef HAVE_MPS
+static struct dump_reloc
+dump_decode_igc_dump_reloc (Lisp_Object lreloc)
+{
+ struct dump_reloc reloc;
+ dump_reloc_set_offset (&reloc, dump_off_from_lisp (dump_pop (&lreloc)));
+ dump_reloc_set_type (&reloc, (enum dump_reloc_type) 0);
+ return reloc;
+}
+
+static void
+dump_emit_igc_dump_reloc (struct dump_context *ctx, Lisp_Object lreloc)
+{
+ eassert (ctx->flags.pack_objects);
+ struct dump_reloc reloc;
+ dump_object_start_1 (ctx, &reloc, sizeof (reloc));
+ reloc = dump_decode_igc_dump_reloc (lreloc);
+ dump_check_dump_off (ctx, dump_reloc_get_offset (reloc));
+ dump_object_finish_1 (ctx, &reloc, sizeof (reloc));
+}
+#endif
+
#ifdef ENABLE_CHECKING
static Lisp_Object
dump_check_overlap_dump_reloc (Lisp_Object lreloc_a,
@@ -4329,7 +4355,7 @@ types. */)
for (int i = 0; i < RELOC_NUM_PHASES; ++i)
ctx->dump_relocs[i] = Qnil;
ctx->object_starts = Qnil;
-# if defined HAVE_MPS && defined ENABLE_CHECKING
+# ifdef HAVE_MPS
ctx->igc_object_starts = Qnil;
# endif
ctx->emacs_relocs = Qnil;
@@ -4501,6 +4527,10 @@ types. */)
ctx->number_hot_relocations = 0;
dump_off number_discardable_relocations =
ctx->number_discardable_relocations;
ctx->number_discardable_relocations = 0;
+# ifdef HAVE_MPS
+ drain_reloc_list (ctx, dump_emit_igc_dump_reloc, NULL,
+ &ctx->igc_object_starts, &ctx->header.igc_object_starts);
+# endif
drain_reloc_list (ctx, dump_emit_dump_reloc, emacs_reloc_merger,
&ctx->object_starts, &ctx->header.object_starts);
drain_reloc_list (ctx, dump_emit_emacs_reloc, dump_merge_emacs_relocs,
- scratch/igc 5306fb37899 07/18: Use IGC_OBJ_DUMPED_xx, (continued)
- scratch/igc 5306fb37899 07/18: Use IGC_OBJ_DUMPED_xx, Gerd Moellmann, 2024/05/14
- scratch/igc ef91137a394 09/18: Fix non-MPS build, Gerd Moellmann, 2024/05/14
- scratch/igc bcbc75748b9 10/18: Work on hash table dumping/loading, Gerd Moellmann, 2024/05/14
- scratch/igc 1cdc505ef76 11/18: Don't give charsets igc_headers, Gerd Moellmann, 2024/05/14
- scratch/igc 6455d3be170 16/18: Visit dumnped igc objects with closure, Gerd Moellmann, 2024/05/14
- scratch/igc 2cba24d3fb3 12/18: pdumper_visit_object_starts, Gerd Moellmann, 2024/05/14
- scratch/igc bef0953409b 17/18: Fix for obarray dump, Gerd Moellmann, 2024/05/14
- scratch/igc f969b5a0827 18/18: Remove IGC_OBJ_DUMPED_BLV, Gerd Moellmann, 2024/05/14
- scratch/igc 280ee228a2c 08/18: Dump with igc_headers if HAVE_MPS, Gerd Moellmann, 2024/05/14
- scratch/igc 496f647b7da 15/18: Cleanup, Gerd Moellmann, 2024/05/14
- scratch/igc 62b52390cef 14/18: Dump igc object starts to file,
Gerd Moellmann <=
- scratch/igc a5c85414c7c 13/18: Record igc object starts, Gerd Moellmann, 2024/05/14