ruby-changes:53109
From: k0kubun <ko1@a...>
Date: Tue, 23 Oct 2018 22:05:33 +0900 (JST)
Subject: [ruby-changes:53109] k0kubun:r65323 (trunk): mjit_worker.c: don't ask MJIT copy job to main thread
k0kubun 2018-10-23 22:05:29 +0900 (Tue, 23 Oct 2018) New Revision: 65323 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65323 Log: 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. Modified files: trunk/mjit_worker.c Index: mjit_worker.c =================================================================== --- mjit_worker.c (revision 65322) +++ mjit_worker.c (revision 65323) @@ -1241,8 +1241,12 @@ mjit_worker(void) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L1241 /* Copy ISeq's inline caches values to avoid race condition. */ 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 */ + } } /* JIT compile */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/