mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit.c: check pch status
* mjit.c (mjit_add_iseq_to_process, mjit_get_iseq_func): check if pch failed before timedout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
83bd262f92
commit
c83decf69a
1 changed files with 2 additions and 2 deletions
4
mjit.c
4
mjit.c
|
@ -1105,7 +1105,7 @@ mjit_add_iseq_to_process(const rb_iseq_t *iseq)
|
|||
{
|
||||
struct rb_mjit_unit_node *node;
|
||||
|
||||
if (!mjit_init_p)
|
||||
if (!mjit_init_p || pch_status == PCH_FAILED)
|
||||
return;
|
||||
|
||||
iseq->body->jit_func = (mjit_func_t)NOT_READY_JIT_ISEQ_FUNC;
|
||||
|
@ -1139,7 +1139,7 @@ mjit_get_iseq_func(struct rb_iseq_constant_body *body)
|
|||
tv.tv_usec = 1000;
|
||||
while (body->jit_func == (mjit_func_t)NOT_READY_JIT_ISEQ_FUNC) {
|
||||
tries++;
|
||||
if (tries / 1000 > MJIT_WAIT_TIMEOUT_SECONDS) {
|
||||
if (tries / 1000 > MJIT_WAIT_TIMEOUT_SECONDS || pch_status == PCH_FAILED) {
|
||||
CRITICAL_SECTION_START(3, "in mjit_get_iseq_func to set jit_func");
|
||||
body->jit_func = (mjit_func_t)NOT_COMPILABLE_JIT_ISEQ_FUNC; /* JIT worker seems dead. Give up. */
|
||||
CRITICAL_SECTION_FINISH(3, "in mjit_get_iseq_func to set jit_func");
|
||||
|
|
Loading…
Add table
Reference in a new issue