65 ConstMethod* _constMethod; // Method read-only data. 66 MethodData* _method_data; 67 MethodCounters* _method_counters; 68 AccessFlags _access_flags; // Access flags 69 int _vtable_index; // vtable index of this method (see VtableIndexFlag) 70 // note: can have vtables with >2**16 elements (because of inheritance) 71 #ifdef CC_INTERP 72 int _result_index; // C++ interpreter needs for converting results to/from stack 73 #endif 74 u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) 75 76 // Flags 77 enum Flags { 78 _jfr_towrite = 1 << 0, 79 _caller_sensitive = 1 << 1, 80 _force_inline = 1 << 2, 81 _dont_inline = 1 << 3, 82 _hidden = 1 << 4, 83 _has_injected_profile = 1 << 5, 84 _running_emcp = 1 << 6, 85 _intrinsic_candidate = 1 << 7 86 }; 87 u1 _flags; 88 89 #ifndef PRODUCT 90 int _compiled_invocation_count; // Number of nmethod invocations so far (for perf. debugging) 91 #endif 92 // Entry point for calling both from and to the interpreter. 93 address _i2i_entry; // All-args-on-stack calling convention 94 // Adapter blob (i2c/c2i) for this Method*. Set once when method is linked. 95 AdapterHandlerEntry* _adapter; 96 // Entry point for calling from compiled code, to compiled code if it exists 97 // or else the interpreter. 98 volatile address _from_compiled_entry; // Cache of: _code ? _code->entry_point() : _adapter->c2i_entry() 99 // 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 // 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 // NULL only at safepoints (because of a de-opt). 104 nmethod* 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 107 // Constructor 812 return (_flags & _hidden) != 0; 813 } 814 void set_hidden(bool x) { 815 _flags = x ? (_flags | _hidden) : (_flags & ~_hidden); 816 } 817 818 bool intrinsic_candidate() { 819 return (_flags & _intrinsic_candidate) != 0; 820 } 821 void set_intrinsic_candidate(bool x) { 822 _flags = x ? (_flags | _intrinsic_candidate) : (_flags & ~_intrinsic_candidate); 823 } 824 825 bool has_injected_profile() { 826 return (_flags & _has_injected_profile) != 0; 827 } 828 void set_has_injected_profile(bool x) { 829 _flags = x ? (_flags | _has_injected_profile) : (_flags & ~_has_injected_profile); 830 } 831 832 ConstMethod::MethodType method_type() const { 833 return _constMethod->method_type(); 834 } 835 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } 836 837 // On-stack replacement support 838 bool has_osr_nmethod(int level, bool match_level) { 839 return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; 840 } 841 842 int mark_osr_nmethods() { 843 return method_holder()->mark_osr_nmethods(this); 844 } 845 846 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) { 847 return method_holder()->lookup_osr_nmethod(this, bci, level, match_level); 848 } 849 850 // Inline cache support 851 void cleanup_inline_caches(); | 65 ConstMethod* _constMethod; // Method read-only data. 66 MethodData* _method_data; 67 MethodCounters* _method_counters; 68 AccessFlags _access_flags; // Access flags 69 int _vtable_index; // vtable index of this method (see VtableIndexFlag) 70 // note: can have vtables with >2**16 elements (because of inheritance) 71 #ifdef CC_INTERP 72 int _result_index; // C++ interpreter needs for converting results to/from stack 73 #endif 74 u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) 75 76 // Flags 77 enum Flags { 78 _jfr_towrite = 1 << 0, 79 _caller_sensitive = 1 << 1, 80 _force_inline = 1 << 2, 81 _dont_inline = 1 << 3, 82 _hidden = 1 << 4, 83 _has_injected_profile = 1 << 5, 84 _running_emcp = 1 << 6, 85 _intrinsic_candidate = 1 << 7, 86 _reserved_stack_access = 1 << 8 87 }; 88 u2 _flags; 89 90 #ifndef PRODUCT 91 int _compiled_invocation_count; // Number of nmethod invocations so far (for perf. debugging) 92 #endif 93 // Entry point for calling both from and to the interpreter. 94 address _i2i_entry; // All-args-on-stack calling convention 95 // Adapter blob (i2c/c2i) for this Method*. Set once when method is linked. 96 AdapterHandlerEntry* _adapter; 97 // Entry point for calling from compiled code, to compiled code if it exists 98 // or else the interpreter. 99 volatile address _from_compiled_entry; // Cache of: _code ? _code->entry_point() : _adapter->c2i_entry() 100 // The entry point for calling both from and to compiled code is 101 // "_code->entry_point()". Because of tiered compilation and de-opt, this 102 // field can come and go. It can transition from NULL to not-null at any 103 // time (whenever a compile completes). It can transition from not-null to 104 // NULL only at safepoints (because of a de-opt). 105 nmethod* volatile _code; // Points to the corresponding piece of native code 106 volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry 107 108 // Constructor 813 return (_flags & _hidden) != 0; 814 } 815 void set_hidden(bool x) { 816 _flags = x ? (_flags | _hidden) : (_flags & ~_hidden); 817 } 818 819 bool intrinsic_candidate() { 820 return (_flags & _intrinsic_candidate) != 0; 821 } 822 void set_intrinsic_candidate(bool x) { 823 _flags = x ? (_flags | _intrinsic_candidate) : (_flags & ~_intrinsic_candidate); 824 } 825 826 bool has_injected_profile() { 827 return (_flags & _has_injected_profile) != 0; 828 } 829 void set_has_injected_profile(bool x) { 830 _flags = x ? (_flags | _has_injected_profile) : (_flags & ~_has_injected_profile); 831 } 832 833 bool has_reserved_stack_access() { 834 return (_flags & _reserved_stack_access) != 0; 835 } 836 837 void set_has_reserved_stack_access(bool x) { 838 _flags = x ? (_flags | _reserved_stack_access) : (_flags & ~_reserved_stack_access); 839 } 840 841 ConstMethod::MethodType method_type() const { 842 return _constMethod->method_type(); 843 } 844 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } 845 846 // On-stack replacement support 847 bool has_osr_nmethod(int level, bool match_level) { 848 return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; 849 } 850 851 int mark_osr_nmethods() { 852 return method_holder()->mark_osr_nmethods(this); 853 } 854 855 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) { 856 return method_holder()->lookup_osr_nmethod(this, bci, level, match_level); 857 } 858 859 // Inline cache support 860 void cleanup_inline_caches(); |