emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: last_marked array is now ifdef'ed away


From: Eli Zaretskii
Subject: Re: last_marked array is now ifdef'ed away
Date: Thu, 12 Sep 2024 12:19:20 +0300

Ping!  Mattias, could you please respond?

> Date: Sat, 07 Sep 2024 09:05:07 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 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.
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]