зеркало из https://github.com/mozilla/gecko-dev.git
Bug 956353 - IonMonkey: Show message when logging a script isn't possible, r=djvj
This commit is contained in:
Родитель
881aade0e7
Коммит
5df1a678bc
|
@ -1714,7 +1714,6 @@ IonCompile(JSContext *cx, JSScript *script,
|
|||
JS_ASSERT(CanIonCompile(builder->script(), executionMode));
|
||||
|
||||
RootedScript builderScript(cx, builder->script());
|
||||
IonSpewNewFunction(graph, builderScript);
|
||||
|
||||
if (recompile) {
|
||||
JS_ASSERT(executionMode == SequentialExecution);
|
||||
|
@ -1724,7 +1723,10 @@ IonCompile(JSContext *cx, JSScript *script,
|
|||
// If possible, compile the script off thread.
|
||||
if (OffThreadCompilationAvailable(cx)) {
|
||||
if (!recompile)
|
||||
SetIonScript(builder->script(), executionMode, ION_COMPILING_SCRIPT);
|
||||
SetIonScript(builderScript, executionMode, ION_COMPILING_SCRIPT);
|
||||
|
||||
IonSpew(IonSpew_Logs, "Can't log script %s:%d. (Compiled on background thread.)",
|
||||
builderScript->filename(), builderScript->lineno());
|
||||
|
||||
if (!StartOffThreadIonCompile(cx, builder)) {
|
||||
IonSpew(IonSpew_Abort, "Unable to start off-thread ion compilation.");
|
||||
|
@ -1756,6 +1758,8 @@ IonCompile(JSContext *cx, JSScript *script,
|
|||
protect.construct(cx->runtime());
|
||||
}
|
||||
|
||||
IonSpewNewFunction(graph, builderScript);
|
||||
|
||||
bool succeeded = builder->build();
|
||||
builder->clearForBackEnd();
|
||||
|
||||
|
|
|
@ -81,22 +81,8 @@ jit::EnableIonDebugLogging()
|
|||
void
|
||||
jit::IonSpewNewFunction(MIRGraph *graph, HandleScript func)
|
||||
{
|
||||
if (GetIonContext()->runtime->onMainThread()) {
|
||||
if (GetIonContext()->runtime->onMainThread())
|
||||
ionspewer.beginFunction(graph, func);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IonSpewEnabled(IonSpew_Logs))
|
||||
return;
|
||||
|
||||
// Ionspewer isn't threads-safe. Therefore logging is disabled for
|
||||
// off-thread spewing. Throw informative message when trying.
|
||||
if (func) {
|
||||
IonSpew(IonSpew_Logs, "Can't log script %s:%d. (Compiled on background thread.)",
|
||||
func->filename(), func->lineno());
|
||||
} else {
|
||||
IonSpew(IonSpew_Logs, "Can't log asm.js compilation. (Compiled on background thread.)");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче