Esempio n. 1
0
void
ion::ParCallToUncompiledScript(JSFunction *func)
{
    JS_ASSERT(InParallelSection());

#ifdef DEBUG
    RawScript script = func->nonLazyScript();
    Spew(SpewBailouts, "Call to uncompiled script: %p:%s:%d", script, script->filename(), script->lineno);
#endif
}
Esempio n. 2
0
void
ion::TraceLIR(uint32_t bblock, uint32_t lir, uint32_t execModeInt,
              const char *lirOpName, const char *mirOpName,
              JSScript *script, jsbytecode *pc)
{
#ifdef DEBUG
    static enum { NotSet, All, Bailouts } traceMode;

    // If you set IONFLAGS=trace, this function will be invoked before every LIR.
    //
    // You can either modify it to do whatever you like, or use gdb scripting.
    // For example:
    //
    // break ParTrace
    // commands
    // continue
    // exit

    if (traceMode == NotSet) {
        // Racy, but that's ok.
        const char *env = getenv("IONFLAGS");
        if (strstr(env, "trace-all"))
            traceMode = All;
        else
            traceMode = Bailouts;
    }

    IonLIRTraceData *cached;
    if (execModeInt == 0)
        cached = &seqTraceData;
    else
        cached = &ForkJoinSlice::Current()->traceData;

    if (bblock == 0xDEADBEEF) {
        if (execModeInt == 0)
            printTrace("BAILOUT", cached);
        else
            SpewBailoutIR(cached->bblock, cached->lir,
                          cached->lirOpName, cached->mirOpName,
                          cached->script, cached->pc);
    }

    cached->bblock = bblock;
    cached->lir = lir;
    cached->execModeInt = execModeInt;
    cached->lirOpName = lirOpName;
    cached->mirOpName = mirOpName;
    cached->script = script;
    cached->pc = pc;

    if (traceMode == All)
        printTrace("Exec", cached);
#endif
}
Esempio n. 3
0
void
jit::TraceLIR(IonLIRTraceData *current)
{
#ifdef DEBUG
    static enum { NotSet, All, Bailouts } traceMode;

    // If you set IONFLAGS=trace, this function will be invoked before every LIR.
    //
    // You can either modify it to do whatever you like, or use gdb scripting.
    // For example:
    //
    // break TraceLIR
    // commands
    // continue
    // exit

    if (traceMode == NotSet) {
        // Racy, but that's ok.
        const char *env = getenv("IONFLAGS");
        if (strstr(env, "trace-all"))
            traceMode = All;
        else
            traceMode = Bailouts;
    }

    IonLIRTraceData *cached;
    if (current->execModeInt == 0)
        cached = &seqTraceData;
    else
        cached = &ForkJoinContext::current()->traceData;

    if (current->blockIndex == 0xDEADBEEF) {
        if (current->execModeInt == 0)
            printTrace("BAILOUT", cached);
        else
            SpewBailoutIR(cached);
    }

    memcpy(cached, current, sizeof(IonLIRTraceData));

    if (traceMode == All)
        printTrace("Exec", cached);
#endif
}
Esempio n. 4
0
void
ion::ParallelAbort(JSScript *script)
{
    JS_ASSERT(InParallelSection());

    ForkJoinSlice *slice = ForkJoinSlice::Current();

    Spew(SpewBailouts, "Parallel abort in %p:%s:%d (hasParallelIonScript:%d)",
         script, script->filename(), script->lineno,
         script->hasParallelIonScript());

    // Otherwise what the heck are we executing?
    JS_ASSERT(script->hasParallelIonScript());

    if (!slice->abortedScript)
        slice->abortedScript = script;
    else
        script->parallelIonScript()->setHasInvalidatedCallTarget();
}