コード例 #1
0
ファイル: methodDataOop.cpp プロジェクト: AllenWeb/openjdk-1
// 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;
}
コード例 #2
0
ファイル: methodData.cpp プロジェクト: stkaushal/jdk8_tl
// 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;
}