From 01e509c45bca9ca5800df36690904f4b883d3292 Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Tue, 5 Nov 2024 10:43:13 +0000 Subject: [PATCH] Remove RGENGC_FORCE_MAJOR_GC flag [Bug #20762] --- .github/workflows/compilers.yml | 1 - gc/default.c | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 4728dd06823cad..2ec864fe52445a 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -265,7 +265,6 @@ jobs: - { uses: './.github/actions/compilers', name: 'GC_PROFILE_MORE_DETAIL', with: { cppflags: '-DGC_PROFILE_MORE_DETAIL' } } - { uses: './.github/actions/compilers', name: 'MALLOC_ALLOCATED_SIZE_CHECK', with: { cppflags: '-DMALLOC_ALLOCATED_SIZE_CHECK' } } - { uses: './.github/actions/compilers', name: 'RGENGC_ESTIMATE_OLDMALLOC', with: { cppflags: '-DRGENGC_ESTIMATE_OLDMALLOC' } } - # - { uses: './.github/actions/compilers', name: 'RGENGC_FORCE_MAJOR_GC', with: { cppflags: '-DRGENGC_FORCE_MAJOR_GC' } } - { uses: './.github/actions/compilers', name: 'RGENGC_OBJ_INFO', with: { cppflags: '-DRGENGC_OBJ_INFO' } } - { uses: './.github/actions/compilers', name: 'RGENGC_PROFILE', with: { cppflags: '-DRGENGC_PROFILE' } } diff --git a/gc/default.c b/gc/default.c index 3ec55882af8359..910526d5d4918e 100644 --- a/gc/default.c +++ b/gc/default.c @@ -255,13 +255,6 @@ int ruby_rgengc_debug; # define RGENGC_ESTIMATE_OLDMALLOC 1 #endif -/* RGENGC_FORCE_MAJOR_GC - * Force major/full GC if this macro is not 0. - */ -#ifndef RGENGC_FORCE_MAJOR_GC -# define RGENGC_FORCE_MAJOR_GC 0 -#endif - #ifndef GC_PROFILE_MORE_DETAIL # define GC_PROFILE_MORE_DETAIL 0 #endif @@ -5479,9 +5472,6 @@ gc_marks_finish(rb_objspace_t *objspace) if (objspace->rgengc.old_objects > objspace->rgengc.old_objects_limit) { gc_needs_major_flags |= GPR_FLAG_MAJOR_BY_OLDGEN; } - if (RGENGC_FORCE_MAJOR_GC) { - gc_needs_major_flags = GPR_FLAG_MAJOR_BY_FORCE; - } gc_report(1, objspace, "gc_marks_finish (marks %"PRIdSIZE" objects, " "old %"PRIdSIZE" objects, total %"PRIdSIZE" slots, " @@ -6389,10 +6379,6 @@ gc_start(rb_objspace_t *objspace, unsigned int reason) reason |= gc_needs_major_flags; do_full_mark = TRUE; } - else if (RGENGC_FORCE_MAJOR_GC) { - reason = GPR_FLAG_MAJOR_BY_FORCE; - do_full_mark = TRUE; - } /* if major gc has been disabled, never do a full mark */ if (!gc_config_full_mark_val) {