Rename rb_gc_impl_get_profile_total_time to rb_gc_impl_get_total_time

This commit is contained in:
Peter Zhu 2024-09-17 11:41:01 -04:00
parent 2af080bd30
commit dc61c7fc7d
Notes: git 2024-09-17 19:23:00 +00:00
4 changed files with 6 additions and 6 deletions

6
gc.c
View File

@ -636,7 +636,7 @@ typedef struct gc_function_map {
// Statistics
VALUE (*set_measure_total_time)(void *objspace_ptr, VALUE flag);
VALUE (*get_measure_total_time)(void *objspace_ptr);
unsigned long long (*get_profile_total_time)(void *objspace_ptr);
unsigned long long (*get_total_time)(void *objspace_ptr);
size_t (*gc_count)(void *objspace_ptr);
VALUE (*latest_gc_info)(void *objspace_ptr, VALUE key);
size_t (*stat)(void *objspace_ptr, VALUE hash_or_sym);
@ -766,7 +766,7 @@ ruby_external_gc_init(void)
// Statistics
load_external_gc_func(set_measure_total_time);
load_external_gc_func(get_measure_total_time);
load_external_gc_func(get_profile_total_time);
load_external_gc_func(get_total_time);
load_external_gc_func(gc_count);
load_external_gc_func(latest_gc_info);
load_external_gc_func(stat);
@ -844,7 +844,7 @@ ruby_external_gc_init(void)
// Statistics
# define rb_gc_impl_set_measure_total_time rb_gc_functions.set_measure_total_time
# define rb_gc_impl_get_measure_total_time rb_gc_functions.get_measure_total_time
# define rb_gc_impl_get_profile_total_time rb_gc_functions.get_profile_total_time
# define rb_gc_impl_get_total_time rb_gc_functions.get_total_time
# define rb_gc_impl_gc_count rb_gc_functions.gc_count
# define rb_gc_impl_latest_gc_info rb_gc_functions.latest_gc_info
# define rb_gc_impl_stat rb_gc_functions.stat

2
gc.rb
View File

@ -352,7 +352,7 @@ module GC
# Return measured \GC total time in nano seconds.
def self.total_time
Primitive.cexpr! %{
ULL2NUM(rb_gc_impl_get_profile_total_time(rb_gc_get_objspace()))
ULL2NUM(rb_gc_impl_get_total_time(rb_gc_get_objspace()))
}
end
end

View File

@ -1523,7 +1523,7 @@ rb_gc_impl_set_event_hook(void *objspace_ptr, const rb_event_flag_t event)
}
unsigned long long
rb_gc_impl_get_profile_total_time(void *objspace_ptr)
rb_gc_impl_get_total_time(void *objspace_ptr)
{
rb_objspace_t *objspace = objspace_ptr;

View File

@ -87,7 +87,7 @@ GC_IMPL_FN VALUE rb_gc_impl_object_id_to_ref(void *objspace_ptr, VALUE object_id
// Statistics
GC_IMPL_FN VALUE rb_gc_impl_set_measure_total_time(void *objspace_ptr, VALUE flag);
GC_IMPL_FN VALUE rb_gc_impl_get_measure_total_time(void *objspace_ptr);
GC_IMPL_FN unsigned long long rb_gc_impl_get_profile_total_time(void *objspace_ptr);
GC_IMPL_FN unsigned long long rb_gc_impl_get_total_time(void *objspace_ptr);
GC_IMPL_FN size_t rb_gc_impl_gc_count(void *objspace_ptr);
GC_IMPL_FN VALUE rb_gc_impl_latest_gc_info(void *objspace_ptr, VALUE key);
GC_IMPL_FN size_t rb_gc_impl_stat(void *objspace_ptr, VALUE hash_or_sym);