// Get a measure of how much mileage the method has on it.
int methodDataOopDesc::mileage_of(methodOop method) {
  int mileage = 0;
#ifdef COMPILER2
  int iic = method->interpreter_invocation_count();
  if (mileage < iic)  mileage = iic; 
#endif
  int icval = method->invocation_counter()->count();
  if (mileage < icval)  mileage = icval; 
  int bcval = method->backedge_counter()->count();
  if (mileage < bcval)  mileage = bcval;
  return mileage;
}
Beispiel #2
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;
}
void NonTieredCompPolicy::disable_compilation(methodOop method) {
    method->invocation_counter()->set_state(InvocationCounter::wait_for_nothing);
    method->backedge_counter()->set_state(InvocationCounter::wait_for_nothing);
}
// This method can be called by any component of the runtime to notify the policy
// that it's recommended to delay the complation of this method.
void NonTieredCompPolicy::delay_compilation(methodOop method) {
    method->invocation_counter()->decay();
    method->backedge_counter()->decay();
}