Beispiel #1
0
// Get a measure of how much mileage the method has on it.
int methodDataOopDesc::mileage_of(methodOop method) {
  int mileage = 0;
  int iic = method->interpreter_invocation_count();
  if (mileage < iic)  mileage = iic;

  InvocationCounter* ic = method->invocation_counter();
  InvocationCounter* bc = method->backedge_counter();

  int icval = ic->count();
  if (ic->carry()) icval += CompileThreshold;
  if (mileage < icval)  mileage = icval;
  int bcval = bc->count();
  if (bc->carry()) bcval += CompileThreshold;
  if (mileage < bcval)  mileage = bcval;
  return mileage;
}
Beispiel #2
0
// Get a measure of how much mileage the method has on it.
int MethodData::mileage_of(Method* method) {
  int mileage = 0;
  if (TieredCompilation) {
    mileage = MAX2(method->invocation_count(), method->backedge_count());
  } else {
    int iic = method->interpreter_invocation_count();
    if (mileage < iic)  mileage = iic;
    InvocationCounter* ic = method->invocation_counter();
    InvocationCounter* bc = method->backedge_counter();
    int icval = ic->count();
    if (ic->carry()) icval += CompileThreshold;
    if (mileage < icval)  mileage = icval;
    int bcval = bc->count();
    if (bc->carry()) bcval += CompileThreshold;
    if (mileage < bcval)  mileage = bcval;
  }
  return mileage;
}