equal
deleted
inserted
replaced
56 class MethodData; |
56 class MethodData; |
57 class MethodCounters; |
57 class MethodCounters; |
58 class ConstMethod; |
58 class ConstMethod; |
59 class InlineTableSizes; |
59 class InlineTableSizes; |
60 class KlassSizeStats; |
60 class KlassSizeStats; |
|
61 class CompiledMethod; |
61 |
62 |
62 class Method : public Metadata { |
63 class Method : public Metadata { |
63 friend class VMStructs; |
64 friend class VMStructs; |
64 friend class JVMCIVMStructs; |
65 friend class JVMCIVMStructs; |
65 private: |
66 private: |
99 // The entry point for calling both from and to compiled code is |
100 // The entry point for calling both from and to compiled code is |
100 // "_code->entry_point()". Because of tiered compilation and de-opt, this |
101 // "_code->entry_point()". Because of tiered compilation and de-opt, this |
101 // field can come and go. It can transition from NULL to not-null at any |
102 // field can come and go. It can transition from NULL to not-null at any |
102 // time (whenever a compile completes). It can transition from not-null to |
103 // time (whenever a compile completes). It can transition from not-null to |
103 // NULL only at safepoints (because of a de-opt). |
104 // NULL only at safepoints (because of a de-opt). |
104 nmethod* volatile _code; // Points to the corresponding piece of native code |
105 CompiledMethod* volatile _code; // Points to the corresponding piece of native code |
105 volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry |
106 volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry |
106 |
107 |
107 // Constructor |
108 // Constructor |
108 Method(ConstMethod* xconst, AccessFlags access_flags); |
109 Method(ConstMethod* xconst, AccessFlags access_flags); |
109 public: |
110 public: |
429 void remove_unshareable_info(); |
430 void remove_unshareable_info(); |
430 |
431 |
431 // nmethod/verified compiler entry |
432 // nmethod/verified compiler entry |
432 address verified_code_entry(); |
433 address verified_code_entry(); |
433 bool check_code() const; // Not inline to avoid circular ref |
434 bool check_code() const; // Not inline to avoid circular ref |
434 nmethod* volatile code() const { assert( check_code(), "" ); return (nmethod *)OrderAccess::load_ptr_acquire(&_code); } |
435 CompiledMethod* volatile code() const { assert( check_code(), "" ); return (CompiledMethod *)OrderAccess::load_ptr_acquire(&_code); } |
435 void clear_code(); // Clear out any compiled code |
436 void clear_code(); // Clear out any compiled code |
436 static void set_code(methodHandle mh, nmethod* code); |
437 static void set_code(methodHandle mh, CompiledMethod* code); |
437 void set_adapter_entry(AdapterHandlerEntry* adapter) { |
438 void set_adapter_entry(AdapterHandlerEntry* adapter) { |
438 constMethod()->set_adapter_entry(adapter); |
439 constMethod()->set_adapter_entry(adapter); |
439 } |
440 } |
440 void update_adapter_trampoline(AdapterHandlerEntry* adapter) { |
441 void update_adapter_trampoline(AdapterHandlerEntry* adapter) { |
441 constMethod()->update_adapter_trampoline(adapter); |
442 constMethod()->update_adapter_trampoline(adapter); |