From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: MPS: native comp Date: Thu, 02 May 2024 17:04:12 -0400 Message-ID: References: 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="10924"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org, Helmut Eller To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 02 23:05:16 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 1s2dcC-0002bj-Lp for ged-emacs-devel@m.gmane-mx.org; Thu, 02 May 2024 23:05:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2dbV-0005Rs-IY; Thu, 02 May 2024 17:04: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 1s2dbP-0005Qw-EV for emacs-devel@gnu.org; Thu, 02 May 2024 17:04:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2dbP-0001Hp-5G; Thu, 02 May 2024 17:04:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=5KVnlYA1zI3lpQujzOdhuaZKbEs4R9/CkkqAqkHG8XQ=; b=oe513ypTnGC2hxDx+K5l QM9fzCUL0EXq++JrJPit3s98vH0VW9g+zXN5vX53wq3pyupymeFqDhIzX1aPZPIyYIVgSeRBP31Xp C6eQqdOkna0z/DmsNSF0Nkxazo/sVaL/IXbuqBC64c5DmQBIvum1zd1vW9narIP0e9FPH8UYi87pP F95WF0TMRWWomYo4XoOC+s2cow6/MvvYu2RprAoE4OxeWcl/a9PPXwuvT0gJ8YsBImxHeS0CL6tip V1zYGb7/6QVjDokAX85Er5PQwZKaP8nQtHdqvDVfwXwyjDJW7lOPuR1GzI7RsJD7ii/bDkUsurNGE pYpDA999ADV+cw==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1s2dbB-0006Jj-18; Thu, 02 May 2024 17:04:25 -0400 In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Thu, 02 May 2024 12:49:47 +0200") 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:318619 Archived-At: Gerd M=C3=B6llmann writes: > Andrea Corallo writes: > >> I think is not correct to add ephemral relocs to the compilation unit. >> They are not reachable by the GC from that path on purpose, so that >> after the load procedure they get GCed. > >> >> If MPS is scanning the stack as our GC does it should just work. Are we >> sure this modification was necessary? > > Yes. > > I've read that comment. > > /* Note: data_ephemeral_vec is not GC protected except than by > this function frame. After this functions will be > deactivated GC will be free to collect it, but it MUST > survive till 'top_level_run' has finished his job. We store > into the ephemeral allocation class only objects that we know > are necessary exclusively during the first load. Once these > are collected we don't have to maintain them in the heap > forever. */ > > The problem is not liveness, it's the existence of untraced references > there. Yes but this way seems that there's no way to tell the GC that something exists other than making it reachable from the heap. There's really no better way to tell MPS at runtime that a certain obj was allocated and needs to be tracked? Thanks Andrea