Move total_freed_objects to size pool

This commit moves the `total_freed_objects` statistic to the size pool
which allows for `total_freed_objects` key in `GC.stat_heap`.
This commit is contained in:
Peter Zhu 2023-08-16 14:05:32 -04:00
parent 52506cbf51
commit 5db8b9b366
Notes: git 2023-08-17 19:53:20 +00:00
2 changed files with 25 additions and 9 deletions

View file

@ -165,6 +165,8 @@ class TestGc < Test::Unit::TestCase
assert_operator stat_heap[:force_major_gc_count], :>=, 0
assert_operator stat_heap[:force_incremental_marking_finish_count], :>=, 0
assert_operator stat_heap[:total_allocated_objects], :>=, 0
assert_operator stat_heap[:total_freed_objects], :>=, 0
assert_operator stat_heap[:total_freed_objects], :<=, stat_heap[:total_allocated_objects]
end
GC.stat_heap(0, stat_heap)
@ -220,6 +222,7 @@ class TestGc < Test::Unit::TestCase
assert_equal stat[:total_allocated_pages], stat_heap_sum[:total_allocated_pages]
assert_equal stat[:total_freed_pages], stat_heap_sum[:total_freed_pages]
assert_equal stat[:total_allocated_objects], stat_heap_sum[:total_allocated_objects]
assert_equal stat[:total_freed_objects], stat_heap_sum[:total_freed_objects]
end
def test_latest_gc_info