Skip to content

Commit

Permalink
Add more debugging output to test_thrashing_for_young_objects
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhu2118 committed Oct 7, 2022
1 parent 24f3e39 commit ad0def7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/ruby/test_gc.rb
Expand Up @@ -410,6 +410,7 @@ def test_thrashing_for_young_objects
1_000_000.times { Object.new }
before_stats = GC.stat
before_stat_heap = GC.stat_heap
1_000_000.times { Object.new }
Expand All @@ -418,9 +419,10 @@ def test_thrashing_for_young_objects
GC.start(full_mark: false)
after_stats = GC.stat
after_stat_heap = GC.stat_heap
# Debugging output to for failures in trunk-repeat50@phosphorus-docker
debug_msg = "before_stats: #{before_stats}\nafter_stats: #{after_stats}"
debug_msg = "before_stats: #{before_stats}\nbefore_stat_heap: #{before_stat_heap}\nafter_stats: #{after_stats}\nafter_stat_heap: #{after_stat_heap}"
# Should not be thrashing in page creation
assert_equal before_stats[:heap_allocated_pages], after_stats[:heap_allocated_pages], debug_msg
Expand Down

0 comments on commit ad0def7

Please sign in to comment.