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: last_marked array is now ifdef'ed away Date: Sat, 07 Sep 2024 09:05:07 +0300 Message-ID: <86zfokyp64.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25065"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 07 08:06:11 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 1smoaI-0006MJ-Kv for ged-emacs-devel@m.gmane-mx.org; Sat, 07 Sep 2024 08:06:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smoZW-0005Um-4t; Sat, 07 Sep 2024 02:05:22 -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 1smoZS-0005UF-TI for emacs-devel@gnu.org; Sat, 07 Sep 2024 02:05:18 -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 1smoZS-0004o8-58; Sat, 07 Sep 2024 02:05:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:To:From:Date:in-reply-to: references; bh=ngzkVzkjvp53+Whnn4oRTgkPNEdnq1M36OWY0gXLrRo=; b=jGm88lROlAj34T UZAtRr38a2VIqItNziR6tLRAe+UGmLKrdMwkwp0N7f6MjSzyL3xEMrdxKEwjjo5ZLbdNNTUnv+lzO i2y2aB/uVAquX2JUg4t/tkR4hlgQDoa4YkcnfEWcFSmy/9PP0W/AZKf1g6DcHg+cQ6yiNJ3IQn/Vk ZoBFUWLpxTMhZVtijklPTU7Nlh2PAdg/68OCfrB+cM0qdlGm3NFf3uiGIjS593QZwuV9iGRpz8EAl kEgXGeRY6YgEBCWzg7Ugl5qq4MEz7vNERQSpU4QcrfN1kS3RyxmvD77Lrej1h6FPVbS3qSy6UHMcK bFn5HNt4JEggul8PKhyw==; 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:323484 Archived-At: 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.