Exemplo n.º 1
0
void NonTieredCompPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) {
    ScopeDesc* sd = trap_scope;
    for (; !sd->is_top(); sd = sd->sender()) {
        // Reset ICs of inlined methods, since they can trigger compilations also.
        sd->method()->invocation_counter()->reset();
    }
    InvocationCounter* c = sd->method()->invocation_counter();
    if (is_osr) {
        // It was an OSR method, so bump the count higher.
        c->set(c->state(), CompileThreshold);
    } else {
        c->reset();
    }
    sd->method()->backedge_counter()->reset();
}