From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: MPS: Forwording symbols Date: Tue, 18 Jun 2024 18:20:26 +0200 Message-ID: <87r0cu9q9h.fsf@gmail.com> References: <87jziod6yc.fsf@gmail.com> <874j9rcuf6.fsf@gmail.com> <87y173bda9.fsf@gmail.com> <87plsfbcd5.fsf@gmail.com> <86cyoeqvfc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6026"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gerd =?utf-8?Q?M=C3=B6llmann?= , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 18 18:21:23 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sJbaE-0001Tc-T6 for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jun 2024 18:21:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJbZS-0005Ut-AZ; Tue, 18 Jun 2024 12:20:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJbZQ-0005UB-4v for emacs-devel@gnu.org; Tue, 18 Jun 2024 12:20:32 -0400 Original-Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbZO-00020Z-6w; Tue, 18 Jun 2024 12:20:31 -0400 Original-Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a6f13dddf7eso687652666b.0; Tue, 18 Jun 2024 09:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718727628; x=1719332428; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ni2X/OciTPVRF1tE4wrPLE8uyfycSxiyF/URNCoRfRg=; b=irY3Ds06E05eYaAtggp2vnHHMCa/yFm+nDtRscPeV/yTRPB6guyRJGZ33lXsn+6RN/ rU3F8YfsNzfoa9ofBWPDYNsK8ROOIwsrDDXu3lQvjkUQLxG34JLUTbe3kVpJfHg1lSzh 48nIhbE7KdQWSRZRgAnRgQVJuHPPE+08Rzov+ona9Y48p+bhwT/38itoqdR8dkUw7o8k s6NCjJdwrU1NIwzgFOtZWowQBpLFz3DZCcDO38z6ueHcoDcolPT4OGz39HoOtJKGycg/ hjE/JZ4oFX1QQFDUBopRCV40a26ru15aBeTyS54/junZTuWpG3ixWhP/0E1TWLcqnHF2 QCPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718727628; x=1719332428; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ni2X/OciTPVRF1tE4wrPLE8uyfycSxiyF/URNCoRfRg=; b=LYtiCvYb1oTtGwoWOIimxfpse05s0mNl/wFQV+P9j9+hBerWrI7E4Vt5040wgOp5WR Qwh6hEzfGXIHrGvRmJ0V5LlhGj938cCcAh+XSRxv4papS8LWaXMUj35sCsPFbDiGwt5l F2wtQQRkLIfL/dVk9S3cPz58D6rLJlZdCtLEY506fFNEWCH7Znd8gnxrHC6BmBz6pYua Cqb3qO5qQfWKO/tqRgO8JBIkTbQlgJStSzaGOzxXe06SWuYebdrhGgXWrAiF798EKxMR ZBS5VtG4wJ+CA7beAkQfCB3qL5k637i8OP9gd8ynxzByUZ7ISeOatuZ5166jQOZKaAta QM2A== X-Forwarded-Encrypted: i=1; AJvYcCVEqF8qnah/7Nuipn7Ag3R5DsscrfxYqlTcM0ATxiZ9BYOCjgVwrRF6p2he1v6YMVQ5AEnXCaJeKzpR01emiPs49wmO X-Gm-Message-State: AOJu0YySBWgvrNuZ4C25IcCMbGpwW0zU3D1fl/KLaOzHw8d2HTF8yrtS rp097a/me7k332mUtPBg+fYIkboOit9PwFz/Hk8UCaz9Sp4mcN0FcghRkA== X-Google-Smtp-Source: AGHT+IE5Lnx3RhNnPG8n2rRoiq2wv7b9w2cMnwYWVKeOQxll/0ocUvwKEB2l8CNUbCfzv01qmj+t7w== X-Received: by 2002:a17:906:ba81:b0:a6f:1c81:e220 with SMTP id a640c23a62f3a-a6fab607168mr214066b.13.1718727627427; Tue, 18 Jun 2024 09:20:27 -0700 (PDT) Original-Received: from caladan (dial-189091.pool.broadband44.net. [212.46.189.91]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f756ee325sm405065066b.90.2024.06.18.09.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 09:20:26 -0700 (PDT) In-Reply-To: <86cyoeqvfc.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 Jun 2024 15:36:55 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=eller.helmut@gmail.com; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320244 Archived-At: --=-=-= Content-Type: text/plain On Tue, Jun 18 2024, Eli Zaretskii wrote: > Any ideas are welcome. I will gladly provide more information if > needed. The 32-bit build has two bignums in the dump. Can you try this patch? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Support-dumping-bignums.patch >From a89b85b556f3905d42b588042475dc56981073f3 Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Tue, 18 Jun 2024 18:12:11 +0200 Subject: [PATCH] Support dumping bignums * src/igc.h (enum igc_obj_type): Add IGC_OBJ_DUMPED_BIGNUM_DATA. * src/igc.h: Allow IGC_OBJ_DUMPED_BIGNUM_DATA in the usual places. * src/pdumper.c (dump_cold_bignum): Emit IGC_OBJ_DUMPED_BIGNUM_DATA headers. --- src/igc.c | 6 ++++++ src/igc.h | 1 + src/pdumper.c | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/src/igc.c b/src/igc.c index 7443973f033..b80d8e7251a 100644 --- a/src/igc.c +++ b/src/igc.c @@ -208,6 +208,7 @@ #define IGC_DEFINE_LIST(data) \ "IGC_OBJ_DUMPED_CHARSET_TABLE", "IGC_OBJ_DUMPED_CODE_SPACE_MASKS", "IGC_OBJ_DUMPED_BUFFER_TEXT", + "IGC_OBJ_DUMPED_BIGNUM_DATA", "IGC_OBJ_DUMPED_BYTES", }; @@ -1374,6 +1375,7 @@ dflt_scan_obj (mps_ss_t ss, mps_addr_t base_start, mps_addr_t base_limit, case IGC_OBJ_BYTES: case IGC_OBJ_DUMPED_CODE_SPACE_MASKS: case IGC_OBJ_DUMPED_BUFFER_TEXT: + case IGC_OBJ_DUMPED_BIGNUM_DATA: case IGC_OBJ_DUMPED_BYTES: /* Can occur in the dump. */ break; @@ -2691,6 +2693,7 @@ finalize (struct igc *gc, mps_addr_t base) case IGC_OBJ_DUMPED_CHARSET_TABLE: case IGC_OBJ_DUMPED_CODE_SPACE_MASKS: case IGC_OBJ_DUMPED_BUFFER_TEXT: + case IGC_OBJ_DUMPED_BIGNUM_DATA: case IGC_OBJ_DUMPED_BYTES: case IGC_OBJ_BYTES: case IGC_OBJ_NUM_TYPES: @@ -2862,6 +2865,7 @@ thread_ap (enum igc_obj_type type) case IGC_OBJ_DUMPED_CHARSET_TABLE: case IGC_OBJ_DUMPED_CODE_SPACE_MASKS: case IGC_OBJ_DUMPED_BUFFER_TEXT: + case IGC_OBJ_DUMPED_BIGNUM_DATA: case IGC_OBJ_DUMPED_BYTES: case IGC_OBJ_NUM_TYPES: emacs_abort (); @@ -3654,6 +3658,7 @@ builtin_obj_type_and_hash (size_t *hash, enum igc_obj_type type, void *client) if (type == IGC_OBJ_DUMPED_CHARSET_TABLE || type == IGC_OBJ_DUMPED_CODE_SPACE_MASKS || type == IGC_OBJ_DUMPED_BUFFER_TEXT + || type == IGC_OBJ_DUMPED_BIGNUM_DATA || type == IGC_OBJ_DUMPED_BYTES) { *hash = 0; @@ -3716,6 +3721,7 @@ igc_dump_finish_obj (void *client, enum igc_obj_type type, case IGC_OBJ_DUMPED_CHARSET_TABLE: case IGC_OBJ_DUMPED_CODE_SPACE_MASKS: case IGC_OBJ_DUMPED_BUFFER_TEXT: + case IGC_OBJ_DUMPED_BIGNUM_DATA: case IGC_OBJ_DUMPED_BYTES: is_in_dump = true; break; diff --git a/src/igc.h b/src/igc.h index f7833a713d8..55ef7d4d56c 100644 --- a/src/igc.h +++ b/src/igc.h @@ -54,6 +54,7 @@ #define EMACS_IGC_H IGC_OBJ_DUMPED_CHARSET_TABLE, IGC_OBJ_DUMPED_CODE_SPACE_MASKS, IGC_OBJ_DUMPED_BUFFER_TEXT, + IGC_OBJ_DUMPED_BIGNUM_DATA, IGC_OBJ_DUMPED_BYTES, IGC_OBJ_NUM_TYPES }; diff --git a/src/pdumper.c b/src/pdumper.c index 9147be38294..5a8dc2ad466 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -3584,6 +3584,9 @@ dump_cold_bignum (struct dump_context *ctx, Lisp_Object object) eassert (sz_nlimbs < DUMP_OFF_MAX); dump_align_output (ctx, alignof (mp_limb_t)); dump_off nlimbs = (dump_off) sz_nlimbs; +# ifdef HAVE_MPS + dump_igc_start_obj (ctx, IGC_OBJ_DUMPED_BIGNUM_DATA, n); +# endif Lisp_Object descriptor = list2 (dump_off_to_lisp (ctx->offset), dump_off_to_lisp (mpz_sgn (*n) < 0 ? -nlimbs : nlimbs)); @@ -3593,6 +3596,9 @@ dump_cold_bignum (struct dump_context *ctx, Lisp_Object object) mp_limb_t limb = mpz_getlimbn (*n, i); dump_write (ctx, &limb, sizeof (limb)); } +# ifdef HAVE_MPS + dump_igc_finish_obj (ctx); +# endif } #ifdef HAVE_NATIVE_COMP -- 2.39.2 --=-=-=--