зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1010417 - IonMonkey: Remove the script size limit for offthread compilation, r=jandem
This commit is contained in:
Родитель
300766f367
Коммит
41e126149e
|
@ -2036,12 +2036,6 @@ CheckScriptSize(JSContext *cx, JSScript* script)
|
||||||
if (!js_JitOptions.limitScriptSize)
|
if (!js_JitOptions.limitScriptSize)
|
||||||
return Method_Compiled;
|
return Method_Compiled;
|
||||||
|
|
||||||
if (script->length() > MAX_OFF_THREAD_SCRIPT_SIZE) {
|
|
||||||
// Some scripts are so large we never try to Ion compile them.
|
|
||||||
IonSpew(IonSpew_Abort, "Script too large (%u bytes)", script->length());
|
|
||||||
return Method_CantCompile;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t numLocalsAndArgs = NumLocalsAndArgs(script);
|
uint32_t numLocalsAndArgs = NumLocalsAndArgs(script);
|
||||||
|
|
||||||
if (script->length() > MAX_MAIN_THREAD_SCRIPT_SIZE ||
|
if (script->length() > MAX_MAIN_THREAD_SCRIPT_SIZE ||
|
||||||
|
|
|
@ -15,7 +15,6 @@ namespace jit {
|
||||||
|
|
||||||
// Longer scripts can only be compiled off thread, as these compilations
|
// Longer scripts can only be compiled off thread, as these compilations
|
||||||
// can be expensive and stall the main thread for too long.
|
// can be expensive and stall the main thread for too long.
|
||||||
static const uint32_t MAX_OFF_THREAD_SCRIPT_SIZE = 100 * 1000;
|
|
||||||
static const uint32_t MAX_MAIN_THREAD_SCRIPT_SIZE = 2 * 1000;
|
static const uint32_t MAX_MAIN_THREAD_SCRIPT_SIZE = 2 * 1000;
|
||||||
static const uint32_t MAX_MAIN_THREAD_LOCALS_AND_ARGS = 256;
|
static const uint32_t MAX_MAIN_THREAD_LOCALS_AND_ARGS = 256;
|
||||||
|
|
||||||
|
|
|
@ -560,7 +560,8 @@ IonBuilderHasHigherPriority(jit::IonBuilder *first, jit::IonBuilder *second)
|
||||||
return !first->script()->hasIonScript();
|
return !first->script()->hasIonScript();
|
||||||
|
|
||||||
// A higher useCount indicates a higher priority.
|
// A higher useCount indicates a higher priority.
|
||||||
return first->script()->getUseCount() > second->script()->getUseCount();
|
return first->script()->getUseCount() / first->script()->length() >
|
||||||
|
second->script()->getUseCount() / second->script()->length();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
Загрузка…
Ссылка в новой задаче