@@ -290,38 +290,6 @@ enum _GCPhase {
290290 GC_PHASE_COLLECT = 1
291291};
292292
293- // if true, enable GC timing statistics
294- //#define WITH_GC_TIMING_STATS 1
295-
296- #ifdef WITH_GC_TIMING_STATS
297-
298- #define QUANTILE_COUNT 5
299- #define MARKER_COUNT (QUANTILE_COUNT * 3 + 2)
300-
301- typedef struct {
302- double q [MARKER_COUNT ];
303- double dn [MARKER_COUNT ];
304- double np [MARKER_COUNT ];
305- int n [MARKER_COUNT ];
306- int count ;
307- double max ;
308- } p2_engine ;
309-
310- struct gc_timing_state {
311- /* timing statistics computed by P^2 algorithm */
312- p2_engine auto_all ; // timing for all automatic collections
313- p2_engine auto_full ; // timing for full (gen2) automatic collections
314- /* Total time spent inside cyclic GC */
315- PyTime_t gc_total_time ;
316- /* Time spent inside incremental mark part of cyclic GC */
317- PyTime_t gc_mark_time ;
318- /* Maximum GC pause time */
319- PyTime_t gc_max_pause ;
320- /* Total number of times GC was run */
321- PyTime_t gc_runs ;
322- };
323- #endif // WITH_GC_TIMING_STATS
324-
325293struct _gc_runtime_state {
326294 /* List of objects that still need to be cleaned up, singly linked
327295 * via their gc headers' gc_prev pointers. */
@@ -351,13 +319,6 @@ struct _gc_runtime_state {
351319 int visited_space ;
352320 int phase ;
353321
354- int freeze_used ;
355-
356- #ifdef WITH_GC_TIMING_STATS
357- /* state for GC timing statistics */
358- struct gc_timing_state timing_state ;
359- #endif
360-
361322#ifdef Py_GIL_DISABLED
362323 /* This is the number of objects that survived the last full
363324 collection. It approximates the number of long lived objects
@@ -370,6 +331,9 @@ struct _gc_runtime_state {
370331 collections, and are awaiting to undergo a full collection for
371332 the first time. */
372333 Py_ssize_t long_lived_pending ;
334+
335+ /* True if gc.freeze() has been used. */
336+ int freeze_active ;
373337#endif
374338};
375339
0 commit comments