diff options
| author | Mattias EngdegÄrd | 2024-09-17 13:07:01 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-09-17 13:27:35 +0200 |
| commit | 4c6f45fa8eef1a15d5790c1f3d3e608b548015db (patch) | |
| tree | a0b5ff77ded212162c2fdaab660a1b58f52c6774 /src/alloc.c | |
| parent | c6077015894dd89c5aa3811bf55d3124394874d0 (diff) | |
| download | emacs-4c6f45fa8eef1a15d5790c1f3d3e608b548015db.tar.gz emacs-4c6f45fa8eef1a15d5790c1f3d3e608b548015db.zip | |
Re-enable GC mark trace buffer by default
Enable GC_REMEMBER_LAST_MARKED by default (it was disabled in Emacs 29)
to make it easier to debug difficult-to-reproduce GC problems
encountered by users. This increases GC costs by about 5 %, which can
be avoided by turning the mark trace buffer back off using the new
--disable-gc-mark-trace option.
See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00240.html
* configure.ac (--disable-gc-mark-trace): New config option.
* etc/NEWS: Mention it.
* src/alloc.c: Enable it by default and avoid a compiler warning.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index 666f77bfce1..258a3d1aaf2 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -6849,11 +6849,10 @@ mark_glyph_matrix (struct glyph_matrix *matrix) | |||
| 6849 | } | 6849 | } |
| 6850 | } | 6850 | } |
| 6851 | 6851 | ||
| 6852 | /* Whether to remember a few of the last marked values for debugging. */ | ||
| 6853 | #define GC_REMEMBER_LAST_MARKED 0 | ||
| 6854 | |||
| 6855 | #if GC_REMEMBER_LAST_MARKED | 6852 | #if GC_REMEMBER_LAST_MARKED |
| 6853 | /* Remember a few of the last marked values for debugging purposes. */ | ||
| 6856 | enum { LAST_MARKED_SIZE = 1 << 9 }; /* Must be a power of 2. */ | 6854 | enum { LAST_MARKED_SIZE = 1 << 9 }; /* Must be a power of 2. */ |
| 6855 | extern Lisp_Object last_marked[LAST_MARKED_SIZE]; | ||
| 6857 | Lisp_Object last_marked[LAST_MARKED_SIZE] EXTERNALLY_VISIBLE; | 6856 | Lisp_Object last_marked[LAST_MARKED_SIZE] EXTERNALLY_VISIBLE; |
| 6858 | static int last_marked_index; | 6857 | static int last_marked_index; |
| 6859 | #endif | 6858 | #endif |