summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-05-31 16:16:32 -0400
committerPeter Zhu <peter@peterzhu.ca>2023-05-31 16:16:50 -0400
commite4163112f6b99d9c205f6bc260878dcb00954a13 (patch)
treee6327c38e113eb44cf8458de2400c6a75071b16b /test
parente8212c55f9a00ef5722ab8c6c093d418d581bcd2 (diff)
More debug code to GC compaction test
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_gc_compact.rb4
1 files changed, 3 insertions, 1 deletions
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