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: Please check if scratch/igc builds with native compilation Date: Wed, 22 May 2024 08:56:04 +0200 Message-ID: References: <87r0du5rly.fsf@gmail.com> <87le425p8i.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="6717"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Andrea Corallo , Emacs Devel , Eli Zaretskii To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 22 08:57:00 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 1s9fuG-0001YU-H1 for ged-emacs-devel@m.gmane-mx.org; Wed, 22 May 2024 08:57:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9ftW-0003EC-TA; Wed, 22 May 2024 02:56:14 -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 1s9ftS-0003Dl-SR for emacs-devel@gnu.org; Wed, 22 May 2024 02:56:10 -0400 Original-Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9ftR-00034b-6E; Wed, 22 May 2024 02:56:10 -0400 Original-Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-572d83e3c7eso10306920a12.3; Tue, 21 May 2024 23:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716360966; x=1716965766; 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=OBkaEE5P3to0YkaUS9NiGOtrfhKKDr6oxnihPOVZerI=; b=mpQsperlDpir5EwuFboK9jRM3LkiDdxxT4lNQAORRyjmrQjyuwLR9ktVu3aAev/45e R04Bi/UoZp1IFESNec4trMrlrHdU802Wp7HgG1+kE2XdMwNot3oSxAWFwMn/3L0rgfyJ hOzQnufenw+V69CgmNlWcm9E/2fpAoUzXJ2xWTUXHVi/7la6Ix/blI9hNU9BLoaxFo42 NJbkNm1kBA0TlX9v7EjOvW63wgko4T3rjriahX89YHBggppsr43gkosTS81dMdSvCUYO n9ROHQGyf4hYjWBfYxx18D9HjvxbTyFbtgFp3bXNigEv173ru6VWk/V8ICvbnjM0eiMz EgpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716360966; x=1716965766; 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=OBkaEE5P3to0YkaUS9NiGOtrfhKKDr6oxnihPOVZerI=; b=EbT9G6/otSc5To6VrM5Dy1Q5VnIoinTKe97GTIWFN0J9He3BfvgTF0GCSKZWlh9tyU AFUlPZgv24Iwi66GRVS82BYglCaamjEPwCkwBAmuFTL/U9L8miKAa/RoQMer/m7UosYm kwlCTDnUIEuxug5BpkD76mboVANhMaXrWJwEFtb4dRwGzsIve77R2CqWhVrTNUvS6l3+ ypIi4o/ZSXTS1eVM34FSBSLrMcEL9QkCAibDn5+9wcIt1TJA2t8Yfxn/18I16OmpA+kS ZgkvlT4utlWgsZBMDfQLyWFuANeXV6mrMqJguZaurGVkUY8sYiuH1wQNZWo2Sv8DBl46 nSiQ== X-Forwarded-Encrypted: i=1; AJvYcCUXoXi6VVzzB2lFp6CbqsjGAWmZC/F1KPOD/m8YVJc+oSiEZWYMnnwYEduIyTINe2FTkWd2AeMRG059P9huxAWERY0nNHtXL2DMMA8CFUWshro= X-Gm-Message-State: AOJu0YzoV4yxoOQTveoVQtpQtlJP7g7EPQStwZgI0ZxgC9yBK1OLzGtN vJfy+0nJVz3Qhd9vaUWzBX4ck4Z6dFkJC88PLUdd3s46HMDb/34pWM/cNA== X-Google-Smtp-Source: AGHT+IG9VKMPQ7NTK5xFv1Xc2k/DRmhcOEn10TgLRdf0ZjkoeS2Mx76bJUQtCdfPhOZReLbzeevRMA== X-Received: by 2002:a50:b411:0:b0:571:c0e6:233c with SMTP id 4fb4d7f45d1cf-57832c95685mr547168a12.37.1716360965342; Tue, 21 May 2024 23:56:05 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a357.dip0.t-ipconnect.de. [79.227.163.87]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57825a6f47bsm1870029a12.64.2024.05.21.23.56.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 23:56:04 -0700 (PDT) In-Reply-To: <87le425p8i.fsf@gmail.com> (Helmut Eller's message of "Wed, 22 May 2024 08:34:37 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52f.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:319477 Archived-At: Helmut Eller writes: > 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?=20 Yes, of course, sorry. > (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.) So, clean build and alas no visible change igc.c:345: Emacs fatal error: assertion failed: h->obj_type !=3D IGC_OBJ_= FWD gmake[3]: *** [Makefile:285: ../lisp/files.elc] Abort trap: 6 gmake[2]: *** [Makefile:933: ../lisp/files.elc] Error 2 ELC+ELN ../lisp/emacs-lisp/syntax.elc ELC+ELN ../lisp/emacs-lisp/cconv.elc ELC+ELN ../lisp/emacs-lisp/tabulated-list.elc ELC+ELN ../lisp/faces.elc igc.c:345: Emacs fatal error: assertion failed: h->obj_type !=3D IGC_OBJ_= FWD gmake[3]: *** [Makefile:285: ../lisp/faces.elc] Abort trap: 6 >> But, what if we park MPS while we are loading the dump? WDYT? > > Is it possible to allocate from a parked arena? Yes, that works.