--- old/src/share/vm/oops/methodCounters.hpp 2016-10-31 17:47:01.000000000 -0700 +++ new/src/share/vm/oops/methodCounters.hpp 2016-10-31 17:47:01.000000000 -0700 @@ -34,6 +34,7 @@ friend class VMStructs; friend class JVMCIVMStructs; private: + Method* _method; // Back link to Method #if defined(COMPILER2) || INCLUDE_JVMCI int _interpreter_invocation_count; // Count of times invoked (reused as prev_event_count in tiered) u2 _interpreter_throwout_count; // Count of times method was exited via exception while interpreting @@ -64,7 +65,8 @@ u1 _highest_osr_comp_level; // Same for OSR level #endif - MethodCounters(methodHandle mh) : _nmethod_age(INT_MAX) + MethodCounters(methodHandle mh) : _method(mh()), + _nmethod_age(INT_MAX) #ifdef TIERED , _rate(0), _prev_time(0), @@ -107,6 +109,8 @@ void deallocate_contents(ClassLoaderData* loader_data) {} DEBUG_ONLY(bool on_stack() { return false; }) // for template + Method* method() const { return _method; } + static int size() { return sizeof(MethodCounters) / wordSize; } bool is_klass() const { return false; }