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: Please check if scratch/igc builds with native compilation Date: Wed, 22 May 2024 08:34:37 +0200 Message-ID: <87le425p8i.fsf@gmail.com> References: <87r0du5rly.fsf@gmail.com> 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="13303"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Andrea Corallo , Emacs Devel , Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 22 08:35:37 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 1s9fZY-0003Mu-OV for ged-emacs-devel@m.gmane-mx.org; Wed, 22 May 2024 08:35:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9fYo-00036n-Hm; Wed, 22 May 2024 02:34:50 -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 1s9fYj-00035p-Qy for emacs-devel@gnu.org; Wed, 22 May 2024 02:34:45 -0400 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9fYf-0007uv-VQ; Wed, 22 May 2024 02:34:44 -0400 Original-Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-420180b5838so28282715e9.2; Tue, 21 May 2024 23:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716359678; x=1716964478; 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=wnNrmm94cNquD5i0L9FK3jvkn+kShPNdjA7UOpxyWYI=; b=b3XZSlbXLOucDIWfJb5QeKnqSbDPIbq7rvBFuZtYs62kEWzGE5+yp/h+DnCyR8bcQn QIwJxE1K2jkqpxCQ+4onLtjmIkQzlMMewFDLWDYmLuhO3io2cN+4tGA7LIY8yl7h0Ugp jbMz0qbX+tt/NqvBPUbqZg54adcNXSORZ/Rn+CRgA2vrqAWj0seZWjHSNf6Anr5IbiUy TC3aSm9Jm4JSHhqKTszDjXkBIa5Dulz99AGG6sq6GrrdDLN27Tk2HtuHlbpZYVytvV// 1BKyUp9pq7+/euwuTROYyYwmhkGYCHtlTDLhNHDiEwIdtsiSAfBjnlsQrJ+MXbb1mgu0 I0Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716359678; x=1716964478; 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=wnNrmm94cNquD5i0L9FK3jvkn+kShPNdjA7UOpxyWYI=; b=ek5rKRwu6DKDUx6Jz/s3Gh9WR0705BJFZDXcOfMyb0mUjg/ixf4e2pvK7rCJD315+0 nSfkUQctPZUjb9iRMZQt+Rj/yp4Qsu6WxX2WXTk5MkQrsBqi5t9IkzIQX67LSBK2dc+m M00ZSw6HdlsGs8XE680XrArSQdEmC0jrzcGi5kxAbV07DEK7kqHyMpLPMhfOjbAbmAKb av7mEHHuH7F1X0MxbmFtzzHxgkse4QHHlRVxTpmJdYtUf8eoPtOeABuCFQw0NylvCN7l KpIrx8IqPrD5FpBU8uZb3pXubdPzJcDLxehqE+M7SVXlO4V//g6QVrqRFj5uAQPNoVGA Tekw== X-Forwarded-Encrypted: i=1; AJvYcCUwm+akicfDc06SxdOvajCON3EBacVFapB37O+mUUjuMXhTLaTLqPU8gTvBj6i94DYI1+PvxttesD64sGcaXdVwZhmMEQ4wFj/VxRJp3ZWjcp8= X-Gm-Message-State: AOJu0YxtD42TE4P9FW1e535us7jCB0dJFFY8iuwy/iN2e47h7UYfgahE 3lZ21Cp6lpL4fZYBZxXglW1EfFEpNyDrFXJwuP3ECFe9L/E2sRgmrcmjpw== X-Google-Smtp-Source: AGHT+IG0RMqRujRYXgpgAKa5CqaCw909Ij/I6hmseFIzCzkpceGl1D5Gry4AldcEwG/DeejSMaIdaw== X-Received: by 2002:a05:600c:3542:b0:41e:a90d:11f5 with SMTP id 5b1f17b1804b1-420fd33b880mr11439795e9.30.1716359678407; Tue, 21 May 2024 23:34:38 -0700 (PDT) Original-Received: from caladan (dial-188233.pool.broadband44.net. [212.46.188.233]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41ff7a840d2sm449149455e9.39.2024.05.21.23.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 23:34:38 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Wed, 22 May 2024 08:07:15 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=eller.helmut@gmail.com; helo=mail-wm1-x336.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:319476 Archived-At: On Wed, May 22 2024, Gerd M=C3=B6llmann wrote: > Helmut Eller writes: > >>> I've checked that d_reloc is indeed scanned by fix_comp_unit. The >>> check gives me reasonable confidence that this "should work". But as >>> an alternative, I also made all the things like d_reloc in the .elns >>> ambiguous roots, so that they cannot possibly be moved, if all works as >>> expected. >> >> Registering the dump as root happens rather late. The relocation code >> allocates a hash table and stores a reference to it in >> comp_u->lambda_gc_guard_h. By that time the dump should already be a >> root. Can we register the dump earlier? AFAIU, the dumper writes zeros >> in the cells for to-be-relocated references and the scan code will >> ignore them. So I think this could work: >> > AFAIU, at the point above the necessary relocations haven't yet been > done, so the dump is still in its "raw" form as it is in the file. Which > means, among other things, that Lisp_Objects haven't been changed to > point to where the dump is mmap'd or where the data segment of Emacs is > and so on. So I don't think that would work. As I said: NULLs shouldn't cause any trouble. The scan code ignores that. And pdumper_next_object seems to its own address calculations. Can you try the patch? (And perhaps delete ~/.emacs.d/eln-cache/* and remove write permissions. I've seem elns being loaded from there. Which is not not good for repeatability.) > But, what if we park MPS while we are loading the dump? WDYT? Is it possible to allocate from a parked arena?