summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-09-17 11:41:01 -0400
committerPeter Zhu <peter@peterzhu.ca>2024-09-17 15:22:43 -0400
commitdc61c7fc7d64e9ad75f7e0ce0239d04a807f78d7 (patch)
treef51109806931e747ca4c26d92473607c5a92f59c
parent2af080bd3031cc4ea37c985f5782355df151ab1c (diff)
Rename rb_gc_impl_get_profile_total_time to rb_gc_impl_get_total_time
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11639
-rw-r--r--gc.c6
-rw-r--r--gc.rb2
-rw-r--r--gc/default.c2
-rw-r--r--gc/gc_impl.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/gc.c b/gc.c
index f47f82e26b..87c613395d 100644
--- a/gc.c
+++ b/gc.c
@@ -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
diff --git a/gc.rb b/gc.rb
index 7b943f1d80..4db1a178f9 100644
--- a/gc.rb
+++ b/gc.rb
@@ -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
diff --git a/gc/default.c b/gc/default.c
index 149eae5971..51bfb4b5e5 100644
--- a/gc/default.c
+++ b/gc/default.c
@@ -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;
diff --git a/gc/gc_impl.h b/gc/gc_impl.h
index ec47c9fe7e..9f20597602 100644
--- a/gc/gc_impl.h
+++ b/gc/gc_impl.h
@@ -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);