diff --git a/hphp/runtime/vm/bytecode.cpp b/hphp/runtime/vm/bytecode.cpp index 0cf17fc88..796b27986 100644 --- a/hphp/runtime/vm/bytecode.cpp +++ b/hphp/runtime/vm/bytecode.cpp @@ -1508,15 +1508,10 @@ void VMExecutionContext::syncGdbState() { } } -static bool jitIsEnabled(const Unit* unit) { - if (!ThreadInfo::s_threadInfo->m_reqInjectionData.getJit()) return false; - return unit == nullptr || !unit->isInterpretOnly(); -} - void VMExecutionContext::enterVMPrologue(ActRec* enterFnAr) { assert(enterFnAr); Stats::inc(Stats::VMEnter); - if (jitIsEnabled(enterFnAr->m_func->unit())) { + if (ThreadInfo::s_threadInfo->m_reqInjectionData.getJit()) { int np = enterFnAr->m_func->numParams(); int na = enterFnAr->numArgs(); if (na > np) na = np + 1; @@ -1537,7 +1532,7 @@ void VMExecutionContext::enterVMWork(ActRec* enterFnAr) { start = enterFnAr->m_func->getFuncBody(); } Stats::inc(Stats::VMEnter); - if (jitIsEnabled(m_fp->unit())) { + if (ThreadInfo::s_threadInfo->m_reqInjectionData.getJit()) { (void) m_fp->unit()->offsetOf(m_pc); /* assert */ if (enterFnAr) { assert(start); diff --git a/hphp/runtime/vm/jit/translator.cpp b/hphp/runtime/vm/jit/translator.cpp index b32637e29..b94d392f1 100755 --- a/hphp/runtime/vm/jit/translator.cpp +++ b/hphp/runtime/vm/jit/translator.cpp @@ -3442,6 +3442,7 @@ Translator::Get() { bool Translator::isSrcKeyInBL(const SrcKey& sk) { auto unit = sk.unit(); + if (unit->isInterpretOnly()) return true; Lock l(m_dbgBlacklistLock); if (m_dbgBLSrcKey.find(sk) != m_dbgBLSrcKey.end()) { return true; diff --git a/hphp/runtime/vm/unit.h b/hphp/runtime/vm/unit.h index 3aa9a40a4..79baf7c24 100644 --- a/hphp/runtime/vm/unit.h +++ b/hphp/runtime/vm/unit.h @@ -644,7 +644,7 @@ public: m_cacheMask = 1 << (id & 7); } bool isInterpretOnly() const { return m_interpretOnly; } - void setInterpretOnly() { m_interpretOnly = false; } + void setInterpretOnly() { m_interpretOnly = true; } bool isMergeOnly() const { return m_mergeOnly; } void clearMergeOnly() { m_mergeOnly = false; } bool isEmpty() const { return m_mergeState & UnitMergeStateEmpty; }