Use Func::m_funcBody to avoid SrcDB lookups

Esse commit está contido em:
mwilliams
2013-04-03 09:21:13 -07:00
commit de Sara Golemon
commit 46e547b907
3 arquivos alterados com 8 adições e 5 exclusões
+3 -1
Ver Arquivo
@@ -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();
}
+4 -3
Ver Arquivo
@@ -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);
+1 -1
Ver Arquivo
@@ -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();