Remove rb_gc_impl_initial_stress_set
This commit is contained in:
parent
dc8c382266
commit
167fba52f0
Notes:
git
2024-09-19 12:21:28 +00:00
8
gc.c
8
gc.c
@ -581,7 +581,6 @@ typedef struct gc_function_map {
|
||||
void (*ractor_cache_free)(void *objspace_ptr, void *cache);
|
||||
void (*set_params)(void *objspace_ptr);
|
||||
void (*init)(void);
|
||||
void (*initial_stress_set)(VALUE flag);
|
||||
size_t *(*size_pool_sizes)(void *objspace_ptr);
|
||||
// Shutdown
|
||||
void (*shutdown_free_objects)(void *objspace_ptr);
|
||||
@ -711,7 +710,6 @@ ruby_external_gc_init(void)
|
||||
load_external_gc_func(ractor_cache_free);
|
||||
load_external_gc_func(set_params);
|
||||
load_external_gc_func(init);
|
||||
load_external_gc_func(initial_stress_set);
|
||||
load_external_gc_func(size_pool_sizes);
|
||||
// Shutdown
|
||||
load_external_gc_func(shutdown_free_objects);
|
||||
@ -789,7 +787,6 @@ ruby_external_gc_init(void)
|
||||
# define rb_gc_impl_ractor_cache_free rb_gc_functions.ractor_cache_free
|
||||
# define rb_gc_impl_set_params rb_gc_functions.set_params
|
||||
# define rb_gc_impl_init rb_gc_functions.init
|
||||
# define rb_gc_impl_initial_stress_set rb_gc_functions.initial_stress_set
|
||||
# define rb_gc_impl_size_pool_sizes rb_gc_functions.size_pool_sizes
|
||||
// Shutdown
|
||||
# define rb_gc_impl_shutdown_free_objects rb_gc_functions.shutdown_free_objects
|
||||
@ -857,6 +854,8 @@ ruby_external_gc_init(void)
|
||||
# define rb_gc_impl_copy_attributes rb_gc_functions.copy_attributes
|
||||
#endif
|
||||
|
||||
static VALUE initial_stress = Qfalse;
|
||||
|
||||
void *
|
||||
rb_objspace_alloc(void)
|
||||
{
|
||||
@ -868,6 +867,7 @@ rb_objspace_alloc(void)
|
||||
ruby_current_vm_ptr->gc.objspace = objspace;
|
||||
|
||||
rb_gc_impl_objspace_init(objspace);
|
||||
rb_gc_impl_stress_set(objspace, initial_stress);
|
||||
|
||||
return objspace;
|
||||
}
|
||||
@ -3450,7 +3450,7 @@ gc_stress_set_m(rb_execution_context_t *ec, VALUE self, VALUE flag)
|
||||
void
|
||||
rb_gc_initial_stress_set(VALUE flag)
|
||||
{
|
||||
rb_gc_impl_initial_stress_set(flag);
|
||||
initial_stress = flag;
|
||||
}
|
||||
|
||||
size_t *
|
||||
|
11
gc/default.c
11
gc/default.c
@ -1556,14 +1556,6 @@ minimum_slots_for_size_pool(rb_objspace_t *objspace, rb_size_pool_t *size_pool)
|
||||
return gc_params.size_pool_init_slots[size_pool_idx];
|
||||
}
|
||||
|
||||
static VALUE initial_stress = Qfalse;
|
||||
|
||||
void
|
||||
rb_gc_impl_initial_stress_set(VALUE flag)
|
||||
{
|
||||
initial_stress = flag;
|
||||
}
|
||||
|
||||
static int
|
||||
object_id_cmp(st_data_t x, st_data_t y)
|
||||
{
|
||||
@ -9360,9 +9352,6 @@ rb_gc_impl_objspace_init(void *objspace_ptr)
|
||||
|
||||
gc_config_full_mark_set(TRUE);
|
||||
|
||||
objspace->flags.gc_stressful = RTEST(initial_stress);
|
||||
objspace->gc_stress_mode = initial_stress;
|
||||
|
||||
objspace->flags.measure_gc = true;
|
||||
malloc_limit = gc_params.malloc_limit_min;
|
||||
objspace->finalize_deferred_pjob = rb_postponed_job_preregister(0, gc_finalize_deferred, objspace);
|
||||
|
@ -32,7 +32,6 @@ GC_IMPL_FN void *rb_gc_impl_ractor_cache_alloc(void *objspace_ptr);
|
||||
GC_IMPL_FN void rb_gc_impl_ractor_cache_free(void *objspace_ptr, void *cache);
|
||||
GC_IMPL_FN void rb_gc_impl_set_params(void *objspace_ptr);
|
||||
GC_IMPL_FN void rb_gc_impl_init(void);
|
||||
GC_IMPL_FN void rb_gc_impl_initial_stress_set(VALUE flag);
|
||||
GC_IMPL_FN size_t *rb_gc_impl_size_pool_sizes(void *objspace_ptr);
|
||||
// Shutdown
|
||||
GC_IMPL_FN void rb_gc_impl_shutdown_free_objects(void *objspace_ptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user