From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: Loaded pdump Date: Fri, 10 May 2024 14:52:46 +0200 Message-ID: References: <87bk5fp0km.fsf@gmail.com> <87seyrni6f.fsf@gmail.com> <87msoygkb5.fsf@gmail.com> <86seyq3qvr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8075"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii , Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 10 14:53:31 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 1s5Pkh-0001so-6P for ged-emacs-devel@m.gmane-mx.org; Fri, 10 May 2024 14:53:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5Pk8-0005Qo-U0; Fri, 10 May 2024 08:52:56 -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 1s5Pk5-0005P4-6P for emacs-devel@gnu.org; Fri, 10 May 2024 08:52:53 -0400 Original-Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s5Pk2-00048B-IM; Fri, 10 May 2024 08:52:52 -0400 Original-Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a59cc765c29so445840666b.3; Fri, 10 May 2024 05:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715345568; x=1715950368; 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=NKhXE8VecaZOGiMNFG7maN5qVbxuzpPJ+yOTTrrp9S0=; b=U/XUxUFcUUCsRhpp8ywepIn1UJ0biqdAJtauf1knN3+JO+Xb+oDg/LGaUiPfpeTOSh x/yrir9AsxzW/LOZfKtNkTuiQZdFF4zKWUPgxPzRTMkPQpdEfy1pHFsHT7z4jtknSZxB Vz6d6oj5CUtjvRPYKOnmBxkw/SCqQOFeIBDSZ3gHI6eKh4IcZXSBVkiNzBSRb0husnbN HMmnOKDO/PId44CszqlcpPmqHNlJzHbAnNNsvWOVu6AnWRibVi5xWpa7/1Oo7195ZBlO hsud+kIsLwwTklJ/JcfglU8zFFDmNFqQT84JCElAmZyxhXfKydUctBj6xJeYTdJAne3f kR4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715345568; x=1715950368; 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=NKhXE8VecaZOGiMNFG7maN5qVbxuzpPJ+yOTTrrp9S0=; b=oB7wXKl+h2UBKGbujjIXN5xL2XefLMTSbOEatHEHN3KLOawypoPGC3C/mFg1m2Xgcg GSOq8ZTipJG8pMsCYVqdSSxqBhCymy70xnIA6A8yovNmoaupNMS5DXCR+T8YDPlfgqoV XmOc2SGlljj3Fvn++NsAaUp1mRtl/TBl4mCHeT+pJRkSorPm/VH+/d92Z5ElyKvbprxZ ctVT1VqCLohpIS5Pg3YbYVsuiApGNW/53mQsNeqdP2XqU/d0cpNCR7ZcUbFdPfS2Me0F MtwR9pu0zQhbUMRv5P6PYq6Dds56HND7SJuzADrY4F2JRNVnUh7LBJd5PtA/GV7bj5qt N8+w== X-Gm-Message-State: AOJu0YyrzHBEJiePOu0/BUoUKVTvCRVlLQ05W8TlaMNGISoztgevR+1Y KNOaj5iY4x6u/7u7bIN6MV6BNCrfj3LdrNUf+mgDFqxxGgx3UzpUrv2Jag== X-Google-Smtp-Source: AGHT+IFk7f5j7cwU393Q2x2gzPO8wyZ4NCXGLb2q3PMloaBgQFH4xL3RfZQFj4NRTbAlM2bIgT3oIg== X-Received: by 2002:a17:906:1358:b0:a59:9eab:1622 with SMTP id a640c23a62f3a-a5a2d665e06mr160690066b.56.1715345567980; Fri, 10 May 2024 05:52:47 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a7ef.dip0.t-ipconnect.de. [79.227.167.239]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781cf86sm181367066b.26.2024.05.10.05.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:52:47 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Fri, 10 May 2024 13:31:21 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62b.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 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:319133 Archived-At: Ok, I think I'll try to get rid of the pdump root. Maybe I'll regret it, and maybe I'll fail, but I feel the root is not the right thing to have. (I'll do in in a branch from the branch in the fork here.) Step 1: Make the loaded dump traversable by dumping igc_headers. How easy or not that is is hard to say. On one hand, there seems to be dump_object_begin, which looks promising, but I already know one case (hash tables), where extending that function to write igc_headers might not be sufficient. And where is one exception there are more. And flags like pack_objects could interfere, and so on. Doenside: igc_header is then even more set in stone. Removing the header for conses becomes even more work. One would need a new section in the dump, just for conses. Step 1.5: When (1) is done, one could make the dump an exact root and use dflt_scan on it. (That's better than an ambig root, but I don't want the root because the world is stopped when roots are scanned.) Step 2: Walk through the dump and make copies of dumped objects in MPS memory. Record a mapping from dumped -> MPS object. Then walk through the copied objects and replace references to dumped objects. This is a bit hand-wavy. At some point when a dump is loaded, things in Emacs are set up to refer to objects in the dump. We will have to do our copy before that and somehow make sure the copy is used instead of the dump. Unmap the dump, remove the root. WDYT?