diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-21 23:02:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-21 23:02:21 +0000 |
commit | c83decf69aa92d4f9a8cec85f47fbeeed7d37dd4 (patch) | |
tree | ce17023663229b206c9b2bf29e10120dc0cd6f26 | |
parent | 83bd262f926bd19d0e7d038571a5feece1981e89 (diff) |
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
-rw-r--r-- | mjit.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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"); |