unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: last_marked array is now ifdef'ed away
Date: Fri, 13 Sep 2024 18:21:58 +0300	[thread overview]
Message-ID: <86a5gbk295.fsf@gnu.org> (raw)
In-Reply-To: <851C7C12-44A1-4661-9EA7-16B0B7209D11@gmail.com> (message from Mattias Engdegård on Fri, 13 Sep 2024 16:43:49 +0200)

> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Fri, 13 Sep 2024 16:43:49 +0200
> Cc: emacs-devel@gnu.org
> 
> 12 sep. 2024 kl. 11.19 skrev Eli Zaretskii <eliz@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
> 
> Yes, debugging code in the inner loop of one of the hottest paths of the GC probably shouldn't be on by default. I've done a large amount of intricate GC debugging and never felt a need for it, but it is easy enough to enable when wanted.

But if a user reports a crash inside GC, that's basically the only
trace we have to try and understand what caused the crash, especially
if the debug info was stripped.  That's why this code was always on by
default.

> We could hitch it to another existing config option like ENABLE_CHECKING, or even make this an independent config option, but there's value in not having to reconfigure and recompile everything when turning it on so keeping it localised in the source seems the better choice.
> 
> We could also change the `#if` to `if` to reduce the risk of bitrot. I'll do that later.

My main concern is not bitrot, it's actually being able to debug
crashes inside GC.

I think we should turn it on again, and remove the conditions.



  reply	other threads:[~2024-09-13 15:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86a5gbk295.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mattias.engdegard@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).