mjit_worker.c: don't ask MJIT copy job to main thread

when main thread is waiting for MJIT worker forever without executing
RUBY_VM_CHECK_INTS due to --jit-wait.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-10-23 13:05:29 +00:00
Родитель 353c86eed4
Коммит 456a54de69
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -1241,8 +1241,12 @@ mjit_worker(void)
/* Copy ISeq's inline caches values to avoid race condition. */ /* Copy ISeq's inline caches values to avoid race condition. */
if (job.cc_entries != NULL || job.is_entries != NULL) { if (job.cc_entries != NULL || job.is_entries != NULL) {
if (copy_cache_from_main_thread(&job) == FALSE) if (UNLIKELY(mjit_opts.wait)) {
mjit_copy_job_handler((void *)&job); /* main thread is waiting in mjit_wait_call() and doesn't race */
}
else if (copy_cache_from_main_thread(&job) == FALSE) {
continue; /* retry postponed_job failure, or stop worker */ continue; /* retry postponed_job failure, or stop worker */
}
} }
/* JIT compile */ /* JIT compile */