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: native comp Date: Mon, 29 Apr 2024 11:09:24 +0200 Message-ID: References: <86le4wsj14.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="24828"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 29 11:10:50 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 1s1N29-0006FZ-5E for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Apr 2024 11:10:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1N0v-000181-5j; Mon, 29 Apr 2024 05:09:33 -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 1s1N0s-00017N-Rz for emacs-devel@gnu.org; Mon, 29 Apr 2024 05:09:30 -0400 Original-Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s1N0q-0001L1-Vf; Mon, 29 Apr 2024 05:09:30 -0400 Original-Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-518931f8d23so4344185e87.3; Mon, 29 Apr 2024 02:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714381766; x=1714986566; 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=VLu+7oN9eZ/drCzW50sVfFtdQbe5yGurSPehuWAMYjE=; b=MUR3NOMv7bJc3xdA8zTMzyxMZEy9DlfGd5nyXBppYurc5RFNRTSplL45pmMJVdw8JA lDcrSMj5tXhfB+9TH0PwXCtu+gTAGUxoC8usfMtRu0Q6HDoG8nrfg77z8v6pQ0+7BVSt z6UuKs3USvHJ9htZiznL5GTu8CfMjd9mrjhkm3gFwjatSHAw0EenrTgg2z6d82iL+oxG +t40D4t4CnKs8SCURt0ELq4cx9o7vHQGbqXomyaZ+jgxMIIreEkod37sGcRC7Jt3SosL I9DGVNfhrSdrzJHW9/XaaO2tPq4P3ZFu5Rd4LJYblZHSQySKGc/QJ1zBIxfe1sqNUtlJ cUNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714381766; x=1714986566; 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=VLu+7oN9eZ/drCzW50sVfFtdQbe5yGurSPehuWAMYjE=; b=iBByLphN/gNOrUGO1Y4NvuqKr/gO9JGF9LpW+utJ/HV4DwsR8bGDLJV57IKsRUEeO+ gw/r5ydIweBzfBpk5zn+XDyaKFe82xtvH+Z4aDd3Gnnqfnzfym9xDv+qItXh5XD5mt/R LJt+KS6iEWgc8sXdZNMOb53oalFDIjF4cb7QEqSmBuHPJ6L75b4LNKQyIBMvwna9OE5b laVvZAzKtAQM7HubjLuQ0dBLsVA7fozViTF0PSq3oJzFna4zd42mOpB4949VThx+WyC6 A+j8+DvapG2hqn/0bQijiFOjeCe0tWMnanPK7gBUYJTt96t7TWq8C88zAjePMvQi4PLg gMOw== X-Forwarded-Encrypted: i=1; AJvYcCXeD3pDbHhl//55J0mcJERNLGp52lRZD48hLllOJsSV+4jJ4cCHX6KTXxG75sWmVVOIyWMoxWa3mvf5zAWCf4tIgNZf X-Gm-Message-State: AOJu0YywTOSWv37pMVr59IE8bMzBxcF8s8yXfAMMTwPgcM9ZlsJZWmWM TCK1XjyzVUT+2c9f28wOtA2vIVLc9/fMz8WdLwPjvnTN+LXVuJ5dbORi/g== X-Google-Smtp-Source: AGHT+IHxibN8e+UOBGciZ6yu+QSAafny328T7OJ/Lh+tRd4xKTBK6og106/hqraOot/LkNQsG3/tYA== X-Received: by 2002:ac2:5b5c:0:b0:51d:8283:cf72 with SMTP id i28-20020ac25b5c000000b0051d8283cf72mr2119116lfp.57.1714381765608; Mon, 29 Apr 2024 02:09:25 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a6a8.dip0.t-ipconnect.de. [79.227.166.168]) by smtp.gmail.com with ESMTPSA id d15-20020adffbcf000000b0034b1bd76d30sm19156644wrs.28.2024.04.29.02.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 02:09:25 -0700 (PDT) In-Reply-To: (Andrea Corallo's message of "Mon, 29 Apr 2024 04:59:06 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=gerd.moellmann@gmail.com; helo=mail-lf1-x130.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:318337 Archived-At: Andrea Corallo writes: > Gerd M=C3=B6llmann writes: > >> Gerd M=C3=B6llmann writes: >> >>> Gerd M=C3=B6llmann writes: >>> >>>> Then, in some way Andrea sets up Lisp_Objects for what we have in the >>>> dylib when it is loaded and these land in data_vec. >>> >>> And that's exactly what's going on, from reading the code. >>> load_static_obj gets a pointer to text represention of Lisp data in the >>> dylib, and then uses Fread to make Lisp_Objects from that. >>> >>> Scratchign head... >> >> Hm, maybe... >> >> @Andrea: How are the Lisp_Objects created in load_static_obj referenced >> from the code? There must be a step that puts them into the machine >> code, right? Probably the "relocs" that are used there. >> >> If that's the case (and I'm almost sure), then we need to make these >> objects immovable. >> >> That was a nice puzzle! > > Oh yes that's correct! If MPS wants to move objects referenced in ELN > files it needs to update what every elns has in his own data_relocs > array! (Or make them immovale indeed). > > ATM in the CU we refence those objects only to have the GC not collect > them. struct Lisp_Native_Comp_Unit { /* STUFFS WE DO NOT DUMP!! */ Lisp_Object *data_imp_relocs; Are these the ones? IIRC, and without looking at the code, this points into the dylib, right? If that's the case, we could scan them ambiguously, and they'd be kept alive and wouldn't move.