Пример #1
0
void
jit::EnableIonDebugSyncLogging()
{
    ionspewer.init();
    ionspewer.setAsyncLogging(false);
    EnableChannel(JitSpew_IonSyncLogs);
}
Пример #2
0
void
GraphSpewer::endFunction()
{
    if (!ionspewer.isEnabled())
        return;

    if (!isSpewing()) {
        MOZ_ASSERT(filteredOutCompilations != 0);
        filteredOutCompilations--;
        return;
    }

    c1Spewer_.endFunction();
    jsonSpewer_.endFunction();

    ionspewer.endFunction(this);
    graph_ = nullptr;
}
Пример #3
0
void
GraphSpewer::beginFunction(JSScript* function)
{
    if (!isSpewing())
        return;

    c1Spewer_.beginFunction(graph_, function);
    jsonSpewer_.beginFunction(function);

    ionspewer.beginFunction();
}
Пример #4
0
void
GraphSpewer::spewPass(const char* pass)
{
    if (!isSpewing())
        return;

    c1Spewer_.spewPass(pass);

    jsonSpewer_.beginPass(pass);
    jsonSpewer_.spewMIR(graph_);
    jsonSpewer_.spewLIR(graph_);
    jsonSpewer_.endPass();

    ionspewer.spewPass(this);
}
Пример #5
0
void
GraphSpewer::init(MIRGraph* graph, JSScript* function)
{
    MOZ_ASSERT(!isSpewing());
    if (!ionspewer.isEnabled())
        return;

    if (!FilterContainsLocation(function)) {
        // filter out logs during the compilation.
        filteredOutCompilations++;
        MOZ_ASSERT(!isSpewing());
        return;
    }

    graph_ = graph;
    MOZ_ASSERT(isSpewing());
}
Пример #6
0
void
GraphSpewer::spewPass(const char* pass, BacktrackingAllocator* ra)
{
    if (!isSpewing())
        return;

    c1Spewer_.spewPass(pass);
    c1Spewer_.spewRanges(pass, ra);

    jsonSpewer_.beginPass(pass);
    jsonSpewer_.spewMIR(graph_);
    jsonSpewer_.spewLIR(graph_);
    jsonSpewer_.spewRanges(ra);
    jsonSpewer_.endPass();

    ionspewer.spewPass(this);
}
Пример #7
0
void
jit::IonSpewNewFunction(MIRGraph *graph, HandleScript func)
{
    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.)");
    }
}
Пример #8
0
void
GraphSpewer::spewPass(const char* pass)
{
    if (!isSpewing())
        return;

    c1Spewer_.spewPass(pass);

    jsonSpewer_.beginPass(pass);
    jsonSpewer_.spewMIR(graph_);
    jsonSpewer_.spewLIR(graph_);
    jsonSpewer_.endPass();

    ionspewer.spewPass(this);

    // As this function is used for debugging, we ignore any of the previous
    // failures and ensure there is enough ballast space, such that we do not
    // exhaust the ballast space before running the next phase.
    AutoEnterOOMUnsafeRegion oomUnsafe;
    if (!graph_->alloc().ensureBallast())
        oomUnsafe.crash("Could not ensure enough ballast space after spewing graph information.");
}
Пример #9
0
void
jit::IonSpewNewFunction(MIRGraph *graph, HandleScript func)
{
    if (GetIonContext()->runtime->onMainThread())
        ionspewer.beginFunction(graph, func);
}
Пример #10
0
void
jit::EnableIonDebugLogging()
{
    EnableChannel(IonSpew_Logs);
    ionspewer.init();
}
Пример #11
0
void
jit::IonSpewEndFunction()
{
    if (GetIonContext()->runtime->onMainThread())
        ionspewer.endFunction();
}
Пример #12
0
void
ion::IonSpewEndFunction()
{
    if (!js_IonOptions.parallelCompilation)
        ionspewer.endFunction();
}
Пример #13
0
void
ion::IonSpewPass(const char *pass, LinearScanAllocator *ra)
{
    if (!js_IonOptions.parallelCompilation)
        ionspewer.spewPass(pass, ra);
}
Пример #14
0
void
ion::IonSpewPass(const char *pass)
{
    if (!js_IonOptions.parallelCompilation)
        ionspewer.spewPass(pass);
}
Пример #15
0
void
ion::IonSpewNewFunction(MIRGraph *graph, HandleScript function)
{
    if (!js_IonOptions.parallelCompilation)
        ionspewer.beginFunction(graph, function);
}
Пример #16
0
void
jit::EnableIonDebugAsyncLogging()
{
    ionspewer.init();
    ionspewer.setAsyncLogging(true);
}
Пример #17
0
void
jit::IonSpewPass(const char *pass)
{
    if (GetIonContext()->runtime->onMainThread())
        ionspewer.spewPass(pass);
}
Пример #18
0
void
jit::IonSpewPass(const char *pass, LinearScanAllocator *ra)
{
    if (GetIonContext()->runtime->onMainThread())
        ionspewer.spewPass(pass, ra);
}
Пример #19
0
void
ion::EnableIonDebugLogging()
{
    ionspewer.init();
}