https://github.com/python/cpython/commit/c0f045f7fd3bb7ccf9828f4bfad55347d097fd41
commit: c0f045f7fd3bb7ccf9828f4bfad55347d097fd41
branch: main
author: Mark Shannon <m...@hotpy.org>
committer: markshannon <m...@hotpy.org>
date: 2024-11-15T08:59:01Z
summary:

GH-124567: Reduce overhead of debug build for GC. Should help CI performance 
(GH-126777)

files:
M Python/gc.c

diff --git a/Python/gc.c b/Python/gc.c
index 028657eb8999c1..fe81ca5989c621 100644
--- a/Python/gc.c
+++ b/Python/gc.c
@@ -23,6 +23,10 @@ typedef struct _gc_runtime_state GCState;
 #  define GC_DEBUG
 #endif
 
+// Define this when debugging the GC
+// #define GC_EXTRA_DEBUG
+
+
 #define GC_NEXT _PyGCHead_NEXT
 #define GC_PREV _PyGCHead_PREV
 
@@ -421,6 +425,11 @@ validate_list(PyGC_Head *head, enum flagstates flags)
     assert(prev == GC_PREV(head));
 }
 
+#else
+#define validate_list(x, y) do{}while(0)
+#endif
+
+#ifdef GC_EXTRA_DEBUG
 static void
 validate_old(GCState *gcstate)
 {
@@ -464,7 +473,6 @@ gc_list_validate_space(PyGC_Head *head, int space) {
 }
 
 #else
-#define validate_list(x, y) do{}while(0)
 #define validate_old(g) do{}while(0)
 #define validate_consistent_old_space(l) do{}while(0)
 #define gc_list_validate_space(l, s) do{}while(0)

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to