diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2020-11-27 21:28:57 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2020-11-27 21:38:51 -0800 |
commit | 16dab6b69263ed9c816bc0283c8c1f2f95dc1027 (patch) | |
tree | 8c08d1077505196c3fef68f50cd9caae75181865 /test/ruby | |
parent | ddb1736bfc0cc65351bc52c150b85baf45871870 (diff) |
Run unload_units in the JIT worker thread
to avoid "Too many JIT code, but skipped unloading units for JIT compaction".
Now we can forget the `in_compact` locking.
Moving some functions from mjit.c to mjit_worker.c because mjit_worker.c
should have functions executed in the JIT worker.
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_jit.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index e5e8293c45..f1019b92c2 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -690,16 +690,11 @@ 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. - 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("Too many JIT code, but skipped unloading units for JIT compaction\n", errs[10], debug_info) - assert_equal("No units can be unloaded -- incremented max-cache-size to 11 for --jit-wait\n", errs[11], debug_info) - assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit10@\(eval\):/, errs[12], debug_info) - + unless RUBY_PLATFORM.match?(/mswin|mingw/) # compaction is not supported on Windows yet assert_equal(3, compactions.size, debug_info) end |