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: Loaded pdump Date: Fri, 10 May 2024 15:37:38 +0200 Message-ID: <87zfsxg53x.fsf@gmail.com> 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4673"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 10 15:38:39 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 1s5QSM-000107-JH for ged-emacs-devel@m.gmane-mx.org; Fri, 10 May 2024 15:38:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5QRU-0000YZ-Ri; Fri, 10 May 2024 09:37:44 -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 1s5QRT-0000YB-QV for emacs-devel@gnu.org; Fri, 10 May 2024 09:37:43 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s5QRS-0007Tf-8L; Fri, 10 May 2024 09:37:43 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-34e0d47bd98so1692153f8f.0; Fri, 10 May 2024 06:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715348260; x=1715953060; darn=gnu.org; h=content-transfer-encoding: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=Zc3owZVHsEHyWEC2IXCzRvQLly+1w8Y7ZwJcYqYOk6U=; b=jUTIqrcQgriVPInar/3U14MV5iMcUKm73RONn6zAgX9Dgwt5kip1MtkVr4XqGLWRWd vaDx07yznadoHl2khjMWOmolUduxT6FbiTlnrW1aiQA+G8W6jg0jTzuYWI7kVqiJ7pZH /cw4KeiyFcIianfjClkN1NbzCBHW5ovZPod1xeRusZXoFD3vJurH9SYUkUIsChNPFjDk cRvaD1uOPPqDLGQCFDuT9fI0m9m6W6qqubrl0kTntJyY1gKKpRUKB2PTSB/fwmkFBsqL OZ4g6MRkO52r1rKhn7Sm8ARC9Q4eRfxQAoLxqdYefWOnY8dxzkkK8nVbCzLpTEZFamAY iU6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715348260; x=1715953060; h=content-transfer-encoding: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=Zc3owZVHsEHyWEC2IXCzRvQLly+1w8Y7ZwJcYqYOk6U=; b=o81Xnn7z3ljs1THDv1juM6V0afm1F5R1XmqXb4sdHcbACXfi2XWlwX12NWR565b9rJ kJypcknf+Y/jA7O9L+n3Wug026vDsRePKTQrdbqjx2yoe9HuSzCmNADx8P/qhIZbRD6X uc1rkd1fgN0NJK/V0+9Zf6jT8Y/dP0rT4DdcSb8JLyENdh3vHJi/eg47n598PqKGBzB/ MIAvb6ICx3cJzHisBYpOFFn3QF0kNX3B+gi35SaiEG1kIbxYq2fBEAcTODgwIgLeBr+Z 7YY5pkwwWc1Qu/A7XiiJuuzfi1WoSGOu+njAvLBSqgr/89OX4joilNIWZTVMuRURE+id x9vA== X-Forwarded-Encrypted: i=1; AJvYcCX/AvBnMWWQFWkzERgC0X/uhsCEN71kDEemKVwXam8gihY0LRLqH5v/3s478//4fJoWIdtmDKbclHfkkCZj0IT3/wyZ X-Gm-Message-State: AOJu0YzV/WnfxhFVf0j/PFbQZFw+5MNaw9Py/pf9AKG5HbCZlXH7iYmu EATpbpD2F2g7PbzcoVa+ZsURyaSQKSQPeXuGVVdo2lGEw2NfGQDHKCb+Aw== X-Google-Smtp-Source: AGHT+IGC9/Kpk0re8tgpB/J/7r3kAkbcho/Hawe3W7VUaI8BGFN4Dyp/IHScJJLVYOoIFOvIPAef6w== X-Received: by 2002:a5d:4744:0:b0:34f:33b4:b951 with SMTP id ffacd0b85a97d-350186eacabmr5194403f8f.29.1715348259973; Fri, 10 May 2024 06:37:39 -0700 (PDT) Original-Received: from caladan (dial-184253.pool.broadband44.net. [212.46.184.253]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502bbbbfecsm4588605f8f.105.2024.05.10.06.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 06:37:39 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Fri, 10 May 2024 14:52:46 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=eller.helmut@gmail.com; helo=mail-wr1-x42e.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:319136 Archived-At: On Fri, May 10 2024, Gerd M=C3=B6llmann wrote: > 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. I feared that hash tables could be difficult; about the flags, I don't know enough. > 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. In the long run, I'd like to have header-less conses. On a typical heap, there are more conses than any other type. It seems like the easiest (only?) way to get that with MPS is to put them in their own pool. Maybe we could keep igc-headers in the pdump, if we need to copy one object at the time anyway. > 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.) And perhaps helps to fix those native comp problems. > 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. I hope that I understand a bit more about the pdumper at that time. At the moment some things, like those different relocation phases, look scarily complicated to me.