From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: last_marked array is now ifdef'ed away Date: Thu, 12 Sep 2024 12:19:20 +0300 Message-ID: <86ed5pkz53.fsf@gnu.org> References: <86zfokyp64.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18552"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: mattiase@acm.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 12 11:20:04 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 1sofzf-0004ft-To for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Sep 2024 11:20:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sofz2-0004DG-QM; Thu, 12 Sep 2024 05:19:24 -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 1sofz1-0004D8-R4 for emacs-devel@gnu.org; Thu, 12 Sep 2024 05:19:23 -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 1sofz1-0003AI-3p; Thu, 12 Sep 2024 05:19:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=t8A1svHaN92JdKKjN9xH0L1BTfDmJ5uEXHqnkdi1ogA=; b=nI81NmayC9KI yFHwkVewa3felgVADY9Dzx8+FyinZmQbsDAqN89sXXJbfqbASIV7icslB2mxQ4Pv6Ime87WmJ07j2 ui3Dx5faTf9gdl3RX5zCouZome7U2pwihlezM469xBtDuQgcYrC00acl3wlrnw8ot4KDjdXI9exdi 3WQcNcu24ilyGqESU6VMOMBdcEbK4x+RgRZII+Ifvn32GT47TZItt40inSjPLkMjBNhXTQ3vBtYY3 hCT0zX0CLxNPFdLsneYI0+LImnRZrk+9IyuGJ2oZAtgHOGqFuE3y+eYXA/8e/6WN+uHxBbH2llCy4 dp6dRYAn6ZFqsL2mI/Izfw==; In-Reply-To: <86zfokyp64.fsf@gnu.org> (message from Eli Zaretskii on Sat, 07 Sep 2024 09:05:07 +0300) 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:323559 Archived-At: Ping! Mattias, could you please respond? > Date: Sat, 07 Sep 2024 09:05:07 +0300 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > Commit 7a8798de95a5 (from Apr 4 2022) made the last_marked[] array and > the related machinery of tracing the marked objects #ifdef'ed away by > default: > > +/* Whether to remember a few of the last marked values for debugging. */ > +#define GC_REMEMBER_LAST_MARKED 0 > + > +#if GC_REMEMBER_LAST_MARKED > enum { LAST_MARKED_SIZE = 1 << 9 }; /* Must be a power of 2. */ > Lisp_Object last_marked[LAST_MARKED_SIZE] EXTERNALLY_VISIBLE; > static int last_marked_index; > +#endif > [...] > - last_marked[last_marked_index++] = obj; > - last_marked_index &= LAST_MARKED_SIZE - 1; > +#if GC_REMEMBER_LAST_MARKED > + last_marked[last_marked_index++] = obj; > + last_marked_index &= LAST_MARKED_SIZE - 1; > +#endif > > I don't remember this aspect being discussed, and the commit log > message doesn't even mention the change, let alone provides a > rationale for it. > > Mattias, why was this done? Are the changes you introduced in that > changeset somehow incompatible with the last_marked[] facility? If > not, I think we should make this again compiled-in by default, because > IME it is a valuable means of debugging GC problems. > >