summaryrefslogtreecommitdiff
path: root/test/ruby/test_jit.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-04-30 21:37:55 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2020-04-30 21:38:50 -0700
commite8a78d7df899291aa025e41207436a450235a4d7 (patch)
tree01e3af7befd7dcbd59b7debd4efb039fcb3dd7b3 /test/ruby/test_jit.rb
parent520ac5da22c30d6db25de6dcbff9607d8a9cd870 (diff)
Do not stop the world during JIT compaction
Running C compiler for JIT compaction inside a critical section may lock main thread for a long time when it triggers GC. As I'm planning to increase this duration a bit, I'd like to make sure this doesn't stop the world. For now, I chose to give up unloading units when it's during JIT compaction, assuming other calls may unload them later.
Diffstat (limited to 'test/ruby/test_jit.rb')
-rw-r--r--test/ruby/test_jit.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 9e4367b6d1..1d0c86d7d7 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -14,6 +14,7 @@ class TestJIT < Test::Unit::TestCase
]
MAX_CACHE_PATTERNS = [
/\AJIT compaction \([^)]+\): .+\n\z/,
+ /\AToo many JIT code, but skipped unloading units for JIT compaction\n\z/,
/\ANo units can be unloaded -- .+\n\z/,
]
@@ -700,8 +701,9 @@ class TestJIT < Test::Unit::TestCase
10.times do |i|
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)
+ 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)
# On --jit-wait, when the number of JIT-ed code reaches --jit-max-cache,
# it should trigger compaction.