diff -r da8c3575c076 -r 43d7a2139756 hotspot/src/share/vm/oops/method.hpp --- a/hotspot/src/share/vm/oops/method.hpp Tue Oct 13 17:34:28 2015 +0200 +++ b/hotspot/src/share/vm/oops/method.hpp Wed Oct 14 08:12:33 2015 -0700 @@ -71,7 +71,6 @@ #ifdef CC_INTERP int _result_index; // C++ interpreter needs for converting results to/from stack #endif - u2 _method_size; // size of this object u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) // Flags @@ -106,7 +105,7 @@ volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry // Constructor - Method(ConstMethod* xconst, AccessFlags access_flags, int size); + Method(ConstMethod* xconst, AccessFlags access_flags); public: static Method* allocate(ClassLoaderData* loader_data, @@ -241,12 +240,8 @@ // code size int code_size() const { return constMethod()->code_size(); } - // method size - int method_size() const { return _method_size; } - void set_method_size(int size) { - assert(0 <= size && size < (1 << 16), "invalid method size"); - _method_size = size; - } + // method size in words + int method_size() const { return sizeof(Method)/wordSize + is_native() ? 2 : 0; } // constant pool for Klass* holding this method ConstantPool* constants() const { return constMethod()->constants(); }