diff options
author | Takashi Kokubun <[email protected]> | 2020-11-27 22:07:02 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2020-11-27 22:26:14 -0800 |
commit | d80226e7bd801fcbccf71f19ba373b7baf71a49e (patch) | |
tree | 0568d8ba75118397c8ebe5bc4ffafa81039a187f /test | |
parent | 12866b0d31755dc045d7c5fce0a61572a41891c7 (diff) |
Avoid unloading units which have enough total_calls
instead of just unloading worst 10% methods.
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_jit.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index f1019b92c2..5585264de6 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -690,11 +690,15 @@ class TestJIT < Test::Unit::TestCase assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit#{i}@\(eval\):/, errs[i], debug_info) end - assert_equal("Too many JIT code -- 1 units unloaded\n", errs[10], debug_info) - assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit10@\(eval\):/, errs[11], debug_info) # On --jit-wait, when the number of JIT-ed code reaches --jit-max-cache, # it should trigger compaction. - unless RUBY_PLATFORM.match?(/mswin|mingw/) # compaction is not supported on Windows yet + if RUBY_PLATFORM.match?(/mswin|mingw/) # compaction is not supported on Windows yet + assert_equal("Too many JIT code -- 1 units unloaded\n", errs[10], debug_info) + assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit10@\(eval\):/, errs[11], debug_info) + else + assert_equal("No units can be unloaded -- incremented max-cache-size to 11 for --jit-wait\n", errs[10], debug_info) + assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit10@\(eval\):/, errs[11], debug_info) + assert_equal(3, compactions.size, debug_info) end |