Exemple #1
0
void
jit::EnableIonDebugSyncLogging()
{
    ionspewer.init();
    ionspewer.setAsyncLogging(false);
    EnableChannel(JitSpew_IonSyncLogs);
}
Exemple #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;
}
Exemple #3
0
void
GraphSpewer::beginFunction(JSScript* function)
{
    if (!isSpewing())
        return;

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

    ionspewer.beginFunction();
}
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);
}
Exemple #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());
}
Exemple #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);
}
Exemple #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.)");
    }
}
Exemple #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.");
}
Exemple #9
0
void
jit::IonSpewNewFunction(MIRGraph *graph, HandleScript func)
{
    if (GetIonContext()->runtime->onMainThread())
        ionspewer.beginFunction(graph, func);
}
Exemple #10
0
void
jit::EnableIonDebugLogging()
{
    EnableChannel(IonSpew_Logs);
    ionspewer.init();
}
Exemple #11
0
void
jit::IonSpewEndFunction()
{
    if (GetIonContext()->runtime->onMainThread())
        ionspewer.endFunction();
}
void
ion::IonSpewEndFunction()
{
    if (!js_IonOptions.parallelCompilation)
        ionspewer.endFunction();
}
void
ion::IonSpewPass(const char *pass, LinearScanAllocator *ra)
{
    if (!js_IonOptions.parallelCompilation)
        ionspewer.spewPass(pass, ra);
}
void
ion::IonSpewPass(const char *pass)
{
    if (!js_IonOptions.parallelCompilation)
        ionspewer.spewPass(pass);
}
void
ion::IonSpewNewFunction(MIRGraph *graph, HandleScript function)
{
    if (!js_IonOptions.parallelCompilation)
        ionspewer.beginFunction(graph, function);
}
Exemple #16
0
void
jit::EnableIonDebugAsyncLogging()
{
    ionspewer.init();
    ionspewer.setAsyncLogging(true);
}
Exemple #17
0
void
jit::IonSpewPass(const char *pass)
{
    if (GetIonContext()->runtime->onMainThread())
        ionspewer.spewPass(pass);
}
Exemple #18
0
void
jit::IonSpewPass(const char *pass, LinearScanAllocator *ra)
{
    if (GetIonContext()->runtime->onMainThread())
        ionspewer.spewPass(pass, ra);
}
void
ion::EnableIonDebugLogging()
{
    ionspewer.init();
}