Beispiel #1
0
void SimpleThresholdPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) {
  for (ScopeDesc* sd = trap_scope;; sd = sd->sender()) {
    if (PrintTieredEvents) {
      methodHandle mh(sd->method());
      print_event(REPROFILE, mh, mh, InvocationEntryBci, CompLevel_none);
    }
    MethodData* mdo = sd->method()->method_data();
    if (mdo != NULL) {
      mdo->reset_start_counters();
    }
    if (sd->is_top()) break;
  }
}
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();
}
Beispiel #3
0
void PcDesc::print(nmethod* code) {
#ifndef PRODUCT
  ResourceMark rm;
  tty->print_cr("PcDesc(pc=0x%lx offset=%x bits=%x):", real_pc(code), pc_offset(), _flags);

  if (scope_decode_offset() == DebugInformationRecorder::serialized_null) {
    return;
  }

  for (ScopeDesc* sd = code->scope_desc_at(real_pc(code));
       sd != NULL;
       sd = sd->sender()) {
    tty->print("  ");
    sd->method()->print_short_name(tty);
    tty->print("  @%d", sd->bci());
    if (sd->should_reexecute())
      tty->print("  reexecute=true");
    tty->cr();
  }
#endif
}