diff options
author | Peter Zhu <[email protected]> | 2024-09-17 11:39:43 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-09-17 15:22:43 -0400 |
commit | 2af080bd3031cc4ea37c985f5782355df151ab1c (patch) | |
tree | 04bdbf15f3f64382908b74d14a730c21502d7107 /gc | |
parent | 5de7517bcb735b9d9c0daddaf7f519f63b033a9e (diff) |
Change rb_gc_impl_get_profile_total_time to return unsigned long long
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11639
Diffstat (limited to 'gc')
-rw-r--r-- | gc/default.c | 4 | ||||
-rw-r--r-- | gc/gc_impl.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gc/default.c b/gc/default.c index d959e108ab..149eae5971 100644 --- a/gc/default.c +++ b/gc/default.c @@ -1522,7 +1522,7 @@ rb_gc_impl_set_event_hook(void *objspace_ptr, const rb_event_flag_t event) objspace->flags.has_newobj_hook = !!(objspace->hook_events & RUBY_INTERNAL_EVENT_NEWOBJ); } -VALUE +unsigned long long rb_gc_impl_get_profile_total_time(void *objspace_ptr) { rb_objspace_t *objspace = objspace_ptr; @@ -1530,7 +1530,7 @@ rb_gc_impl_get_profile_total_time(void *objspace_ptr) unsigned long long marking_time = objspace->profile.marking_time_ns; unsigned long long sweeping_time = objspace->profile.sweeping_time_ns; - return ULL2NUM(marking_time + sweeping_time); + return marking_time + sweeping_time; } VALUE diff --git a/gc/gc_impl.h b/gc/gc_impl.h index 12527845f7..ec47c9fe7e 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 VALUE rb_gc_impl_get_profile_total_time(void *objspace_ptr); +GC_IMPL_FN unsigned long long rb_gc_impl_get_profile_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); |