unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* last_marked array is now ifdef'ed away
@ 2024-09-07  6:05 Eli Zaretskii
  2024-09-12  9:19 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2024-09-07  6:05 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: emacs-devel

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.



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-09-17 13:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07  6:05 last_marked array is now ifdef'ed away Eli Zaretskii
2024-09-12  9:19 ` Eli Zaretskii
2024-09-13 14:43   ` Mattias Engdegård
2024-09-13 15:21     ` Eli Zaretskii
2024-09-14 17:05       ` Mattias Engdegård
2024-09-14 17:30         ` Eli Zaretskii
2024-09-14 20:30           ` Mattias Engdegård
2024-09-15  5:51             ` Eli Zaretskii
2024-09-15 13:58               ` Mattias Engdegård
2024-09-15 14:21                 ` Eli Zaretskii
2024-09-17 10:15                   ` Mattias Engdegård
2024-09-17 13:22                     ` Eli Zaretskii
2024-09-14 22:50           ` Stefan Kangas
2024-09-15  6:01             ` Eli Zaretskii
2024-09-16 18:07               ` Andrea Corallo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).