hotspot/src/share/vm/ci/ciMethod.cpp
changeset 24442 4d4ae31dea26
parent 24018 77b156916bab
child 26433 27020fde2dbf
equal deleted inserted replaced
24441:50946251753f 24442:4d4ae31dea26
   127   _holder = env->get_instance_klass(h_m()->method_holder());
   127   _holder = env->get_instance_klass(h_m()->method_holder());
   128   ciSymbol* sig_symbol = env->get_symbol(h_m()->signature());
   128   ciSymbol* sig_symbol = env->get_symbol(h_m()->signature());
   129   constantPoolHandle cpool = h_m()->constants();
   129   constantPoolHandle cpool = h_m()->constants();
   130   _signature = new (env->arena()) ciSignature(_holder, cpool, sig_symbol);
   130   _signature = new (env->arena()) ciSignature(_holder, cpool, sig_symbol);
   131   _method_data = NULL;
   131   _method_data = NULL;
       
   132   _nmethod_age = h_m()->nmethod_age();
   132   // Take a snapshot of these values, so they will be commensurate with the MDO.
   133   // Take a snapshot of these values, so they will be commensurate with the MDO.
   133   if (ProfileInterpreter || TieredCompilation) {
   134   if (ProfileInterpreter || TieredCompilation) {
   134     int invcnt = h_m()->interpreter_invocation_count();
   135     int invcnt = h_m()->interpreter_invocation_count();
   135     // if the value overflowed report it as max int
   136     // if the value overflowed report it as max int
   136     _interpreter_invocation_count = invcnt < 0 ? max_jint : invcnt ;
   137     _interpreter_invocation_count = invcnt < 0 ? max_jint : invcnt ;
  1274   }
  1275   }
  1275   return false;
  1276   return false;
  1276 }
  1277 }
  1277 
  1278 
  1278 // ------------------------------------------------------------------
  1279 // ------------------------------------------------------------------
       
  1280 // ciMethod::profile_aging
       
  1281 //
       
  1282 // Should the method be compiled with an age counter?
       
  1283 bool ciMethod::profile_aging() const {
       
  1284   return UseCodeAging && (!MethodCounters::is_nmethod_hot(nmethod_age()) &&
       
  1285                           !MethodCounters::is_nmethod_age_unset(nmethod_age()));
       
  1286 }
       
  1287 // ------------------------------------------------------------------
  1279 // ciMethod::print_codes
  1288 // ciMethod::print_codes
  1280 //
  1289 //
  1281 // Print the bytecodes for this method.
  1290 // Print the bytecodes for this method.
  1282 void ciMethod::print_codes_on(outputStream* st) {
  1291 void ciMethod::print_codes_on(outputStream* st) {
  1283   check_is_loaded();
  1292   check_is_loaded();