Use Func::m_funcBody to avoid SrcDB lookups
Esse commit está contido em:
@@ -1850,9 +1850,11 @@ void VMExecutionContext::syncGdbState() {
|
||||
}
|
||||
|
||||
void VMExecutionContext::enterVMWork(ActRec* enterFnAr) {
|
||||
TCA start = nullptr;
|
||||
if (enterFnAr) {
|
||||
EventHook::FunctionEnter(enterFnAr, EventHook::NormalFunc);
|
||||
INST_HOOK_FENTRY(enterFnAr->m_func->fullName());
|
||||
start = enterFnAr->m_func->getFuncBody();
|
||||
}
|
||||
Stats::inc(Stats::VMEnter);
|
||||
if (RuntimeOption::EvalJit &&
|
||||
@@ -1862,7 +1864,7 @@ void VMExecutionContext::enterVMWork(ActRec* enterFnAr) {
|
||||
LIKELY(!DEBUGGER_FORCE_INTR)) {
|
||||
Transl::SrcKey sk(Transl::curFunc(), m_pc);
|
||||
(void) curUnit()->offsetOf(m_pc); /* assert */
|
||||
tx64->enterTC(sk);
|
||||
tx64->enterTC(sk, start);
|
||||
} else {
|
||||
dispatch();
|
||||
}
|
||||
|
||||
@@ -3278,7 +3278,7 @@ void enterTCHelper(Cell* vm_sp,
|
||||
void* targetCacheBase) asm ("__enterTCHelper");
|
||||
|
||||
void
|
||||
TranslatorX64::enterTC(SrcKey sk) {
|
||||
TranslatorX64::enterTC(SrcKey sk, TCA start) {
|
||||
using namespace TargetCache;
|
||||
|
||||
if (debug) {
|
||||
@@ -3289,7 +3289,7 @@ TranslatorX64::enterTC(SrcKey sk) {
|
||||
TReqInfo info;
|
||||
info.requestNum = -1;
|
||||
info.saved_rStashedAr = 0;
|
||||
TCA start = getTranslation(sk, true);
|
||||
if (UNLIKELY(!start)) start = getTranslation(sk, true);
|
||||
for (;;) {
|
||||
assert(sizeof(Cell) == 16);
|
||||
assert(((uintptr_t)vmsp() & (sizeof(Cell) - 1)) == 0);
|
||||
@@ -3308,7 +3308,8 @@ TranslatorX64::enterTC(SrcKey sk) {
|
||||
sk = SrcKey(curFunc(), newPc);
|
||||
start = getTranslation(sk, true);
|
||||
}
|
||||
assert(isValidCodeAddress(start));
|
||||
assert(start == (TCA)HPHP::VM::Transl::funcBodyHelperThunk ||
|
||||
isValidCodeAddress(start));
|
||||
assert(!s_writeLease.amOwner());
|
||||
curFunc()->validate();
|
||||
INC_TPC(enter_tc);
|
||||
|
||||
@@ -991,7 +991,7 @@ public:
|
||||
* a given nested invocation of the intepreter (calling back into it
|
||||
* as necessary for blocks that need to be interpreted).
|
||||
*/
|
||||
void enterTC(SrcKey sk);
|
||||
void enterTC(SrcKey sk, TCA start);
|
||||
|
||||
TranslatorX64();
|
||||
virtual ~TranslatorX64();
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário