From c61ea87c72be6e5bd15be4797ea63dfe6fe97440 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Wed, 13 Nov 2024 11:30:32 +0000 Subject: [PATCH 1/3] Reduce overhead of debug build for GC. Should help CI performance --- Python/gc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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) From 5f53b91fd1be61a37533d178047aa54e0439ed9c Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Wed, 13 Nov 2024 11:37:41 +0000 Subject: [PATCH 2/3] Spurious change to force testing --- Doc/library/gc.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 1065ec30802841..c361e01c4e6d75 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -358,3 +358,6 @@ The following constants are provided for use with :func:`set_debug`: The debugging flags necessary for the collector to print information about a leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_SAVEALL``). + + +Spurious change to force doctests to run in CI. From 620b97d131bafa4090c592f0a608f4d7eab531a4 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Wed, 13 Nov 2024 11:57:37 +0000 Subject: [PATCH 3/3] Revert spurious change --- Doc/library/gc.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index c361e01c4e6d75..1065ec30802841 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -358,6 +358,3 @@ The following constants are provided for use with :func:`set_debug`: The debugging flags necessary for the collector to print information about a leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_SAVEALL``). - - -Spurious change to force doctests to run in CI.