From e4163112f6b99d9c205f6bc260878dcb00954a13 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 31 May 2023 16:16:32 -0400 Subject: More debug code to GC compaction test --- test/ruby/test_gc_compact.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb index 64077e6cdf..f36f0ee883 100644 --- a/test/ruby/test_gc_compact.rb +++ b/test/ruby/test_gc_compact.rb @@ -434,9 +434,11 @@ class TestGCCompact < Test::Unit::TestCase ary = HASH_COUNT.times.map { base_hash.dup } ary.each { |h| h[:i] = 9 } + before_stat_heap = GC.stat_heap stats = GC.verify_compaction_references(expand_heap: true, toward: :empty) + after_stat_heap = GC.stat_heap - assert_operator(stats[:moved_down][:T_HASH], :>=, 500, "read barrier faults: before #{before_read_barrier_faults}, after #{GC.stat(:read_barrier_faults)}") + assert_operator(stats[:moved_down][:T_HASH], :>=, 500, "read barrier faults: before #{before_read_barrier_faults}, after #{GC.stat(:read_barrier_faults)}, stat_heap: before #{before_stat_heap}, after: #{after_stat_heap}, stats: #{stats}") end; end -- cgit v1.2.3