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: Thu, 02 May 2024 12:49:47 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30021"; 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: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 02 12:50:44 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 1s2U1T-0007ct-Qm for ged-emacs-devel@m.gmane-mx.org; Thu, 02 May 2024 12:50:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2U0h-0007VW-M0; Thu, 02 May 2024 06:49:55 -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 1s2U0f-0007Uy-Ck for emacs-devel@gnu.org; Thu, 02 May 2024 06:49:53 -0400 Original-Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2U0d-0001oT-Np; Thu, 02 May 2024 06:49:53 -0400 Original-Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a58c89bda70so771511166b.3; Thu, 02 May 2024 03:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714646989; x=1715251789; darn=gnu.org; h=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=DC6VdfTySi5vvKCdrO6ZyehM1gJOu6zIf0deeMX/LlQ=; b=BA+E2rVBPEJBFtyb923fNK3DS214P+flQF8pGF0dvqoihqi8wXRH946x5v/Rff4g4q 2Aa5dEVBLkB5SRLPE5DTCSIrz8Sq0WWyX2Ye2LsTdPdUyiG2Mq40aZguOJClFXQZM5Fa do6rPCpfwdiU4C/Ps0eCbgH4aqEBfkFtSK5ew2uSCuuRw3m+qslQD6MYbFRRRAU9FIvZ 7IcGPF3Kz37SpSkhx0ZzxaJa/XFZjdppj7C3Mmxd8PEtDPyefK6xFL/7IwFu9ssM52JE EGaLmmYSHMwP/dClLzMx+HefF3YnuCCRRHOIkpUoH2p+VaCriuqJqDdycchQGYfkbDgJ 8uGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714646989; x=1715251789; h=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=DC6VdfTySi5vvKCdrO6ZyehM1gJOu6zIf0deeMX/LlQ=; b=OyY6NACJBT2v/K6R5JhCOwACzd68yOJstT5fLMoFImRZL0bxnJYp2PXXOxCJW0Hev7 T9h2up4QjUGV0Ah5l7Vxm52Pf9JCQz2UKIduzt1ncFS4KMo1v/tZ5hIKgYmXKEXagH3u y7XnVVgmNs8kH3Y5BvkLA+inThnEbp+Lg+rE0064ev6hiIRi8ExX+VJd1u0oGVS2oO30 ZxUipmjF3A5XR68nBlwMadR5i01DdJNkdCXlSUdfvjBRamKs6mg1NUo23ccheSnl50T3 j6/cxFIwjqAyROsTtUFaRUJpQU+5A0qLpRmNxmMxJfgtDcKSxGVP/FLiKm2MrIypmZ0a cDKg== X-Forwarded-Encrypted: i=1; AJvYcCUqdo67ceaKRq06g8zCppGIuSWbk4q6Un1MXKcsx0ZzzjZixzJxwGUIsjW9xMkQ6pU+VYvXklF8cqgMUTCyEI8gQRqQ X-Gm-Message-State: AOJu0YxsNnk3TQSMcBWuuCyHLzcmILgGry3AQDaGbo96/1vQnExtjgYu KvaKB8LE5gCEC1t8xj+hmYoAbApuElIjlN3VPx1f5nFtfCNEgHaXMZrgiA== X-Google-Smtp-Source: AGHT+IHKrON/i2LFGzqwJuBrk9g9d9eqSZRIKudTPldQqy8brzzik5QXE/0jhD83vzhVCWERxHnZVA== X-Received: by 2002:a05:6402:2685:b0:572:a6f5:bc91 with SMTP id w5-20020a056402268500b00572a6f5bc91mr3428615edd.24.1714646989090; Thu, 02 May 2024 03:49:49 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3adac.dip0.t-ipconnect.de. [79.227.173.172]) by smtp.gmail.com with ESMTPSA id d25-20020aa7ce19000000b00572a7127cb0sm392299edv.50.2024.05.02.03.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 03:49:48 -0700 (PDT) In-Reply-To: (Andrea Corallo's message of "Thu, 02 May 2024 06:24:07 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x636.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:318563 Archived-At: 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. It's easy to tell igc when these references are definitely no longer in use, by setting a cu member to NULL. Then igc will no longer trace them. Haven't done that yet # ifdef HAVE_MPS /* FIXME: If we want to get rid of these objects, stop tracing these references at some point. */ comp_u->data_eph_relocs = data_eph_relocs; comp_u->n_data_eph_relocs = d_vec_len; # endif