Turn SrcRec
There's no compelling reason for this to be a fixed constant. I also renamed EvalMaxTrans in an attempt to differentiate it from the new option.
Esse commit está contido em:
@@ -399,6 +399,8 @@ public:
|
||||
F(bool, ProfileBC, false) \
|
||||
F(bool, ProfileHWEnable, true) \
|
||||
F(string, ProfileHWEvents, string("")) \
|
||||
F(uint32_t, JitMaxTranslations, 12) \
|
||||
F(uint64_t, JitGlobalTranslationLimit, -1) \
|
||||
F(bool, JitTrampolines, true) \
|
||||
F(string, JitProfilePath, string("")) \
|
||||
F(int32_t, JitStressTypePredPercent, 0) \
|
||||
@@ -433,7 +435,6 @@ public:
|
||||
F(bool, HHIRAllocXMMRegs, true) \
|
||||
F(bool, HHIRGenerateAsserts, debug) \
|
||||
F(bool, HHIRDirectExit, true) \
|
||||
F(uint64_t, MaxTrans, -1) \
|
||||
F(bool, HHIRDeadCodeElim, true) \
|
||||
/* DumpBytecode =1 dumps user php, =2 dumps systemlib & user php */ \
|
||||
F(int32_t, DumpBytecode, 0) \
|
||||
|
||||
@@ -80,7 +80,7 @@ void SrcRec::emitFallbackJump(TCA from, int cc /* = -1 */) {
|
||||
void SrcRec::newTranslation(TCA newStart) {
|
||||
// When translation punts due to hitting limit, will generate one
|
||||
// more translation that will call the interpreter.
|
||||
assert(m_translations.size() <= kMaxTranslations);
|
||||
assert(m_translations.size() <= RuntimeOption::EvalJitMaxTranslations);
|
||||
|
||||
TRACE(1, "SrcRec(%p)::newTranslation @%p, ", this, newStart);
|
||||
|
||||
|
||||
@@ -70,8 +70,6 @@ private:
|
||||
* SrcRec: record of translator output for a given source location.
|
||||
*/
|
||||
struct SrcRec {
|
||||
static const unsigned int kMaxTranslations = 12;
|
||||
|
||||
SrcRec()
|
||||
: m_topTranslation(nullptr)
|
||||
, m_anchorTranslation(0)
|
||||
|
||||
@@ -1276,7 +1276,8 @@ TCA TranslatorX64::retranslateAndPatchNoIR(SrcKey sk,
|
||||
if (!writer) return nullptr;
|
||||
SKTRACE(1, sk, "retranslateAndPatchNoIR\n");
|
||||
SrcRec* srcRec = getSrcRec(sk);
|
||||
if (srcRec->translations().size() == SrcRec::kMaxTranslations + 1) {
|
||||
if (srcRec->translations().size() ==
|
||||
RuntimeOption::EvalJitMaxTranslations + 1) {
|
||||
// we've gone over the translation limit and already have an anchor
|
||||
// translation that will interpret, so just return NULL and force
|
||||
// interpretation of this BB.
|
||||
@@ -1450,7 +1451,7 @@ TranslatorX64::translate(const TranslArgs& args) {
|
||||
assert(((uintptr_t)vmfp() & (sizeof(Cell) - 1)) == 0);
|
||||
|
||||
if (!args.m_interp) {
|
||||
if (m_numHHIRTrans == RuntimeOption::EvalMaxTrans) {
|
||||
if (m_numHHIRTrans == RuntimeOption::EvalJitGlobalTranslationLimit) {
|
||||
RuntimeOption::EvalJit = false;
|
||||
ThreadInfo::s_threadInfo->m_reqInjectionData.updateJit();
|
||||
}
|
||||
@@ -10776,7 +10777,7 @@ TranslatorX64::translateInstr(const Tracelet& t,
|
||||
bool
|
||||
TranslatorX64::checkTranslationLimit(SrcKey sk,
|
||||
const SrcRec& srcRec) const {
|
||||
if (srcRec.translations().size() == SrcRec::kMaxTranslations) {
|
||||
if (srcRec.translations().size() == RuntimeOption::EvalJitMaxTranslations) {
|
||||
INC_TPC(max_trans);
|
||||
if (debug && Trace::moduleEnabled(Trace::tx64, 2)) {
|
||||
const vector<TCA>& tns = srcRec.translations();
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário