diff -r 50946251753f -r 4d4ae31dea26 hotspot/src/share/vm/ci/ciMethod.cpp --- a/hotspot/src/share/vm/ci/ciMethod.cpp Tue May 13 11:25:17 2014 +0200 +++ b/hotspot/src/share/vm/ci/ciMethod.cpp Tue May 13 11:32:10 2014 -0700 @@ -129,6 +129,7 @@ constantPoolHandle cpool = h_m()->constants(); _signature = new (env->arena()) ciSignature(_holder, cpool, sig_symbol); _method_data = NULL; + _nmethod_age = h_m()->nmethod_age(); // Take a snapshot of these values, so they will be commensurate with the MDO. if (ProfileInterpreter || TieredCompilation) { int invcnt = h_m()->interpreter_invocation_count(); @@ -1276,6 +1277,14 @@ } // ------------------------------------------------------------------ +// ciMethod::profile_aging +// +// Should the method be compiled with an age counter? +bool ciMethod::profile_aging() const { + return UseCodeAging && (!MethodCounters::is_nmethod_hot(nmethod_age()) && + !MethodCounters::is_nmethod_age_unset(nmethod_age())); +} +// ------------------------------------------------------------------ // ciMethod::print_codes // // Print the bytecodes for this method.