131 vframeArray* _vframe_array_head; // Holds the heap of the active vframeArrays
132 vframeArray* _vframe_array_last; // Holds last vFrameArray we popped
133 // Holds updates by JVMTI agents for compiled frames that cannot be performed immediately. They
134 // will be carried out as soon as possible which, in most cases, is just before deoptimization of
135 // the frame, when control returns to it.
136 JvmtiDeferredUpdates* _jvmti_deferred_updates;
137
138 // Handshake value for fixing 6243940. We need a place for the i2c
139 // adapter to store the callee Method*. This value is NEVER live
140 // across a gc point so it does NOT have to be gc'd
141 // The handshake is open ended since we can't be certain that it will
142 // be nulled. This is because we rarely ever see the race and end up
143 // in handle_wrong_method which is the backend of the handshake. See
144 // code in i2c adapters and handle_wrong_method.
145
146 Method* _callee_target;
147
148 // Used to pass back results to the interpreter or generated code running Java code.
149 oop _vm_result_oop; // oop result is GC-preserved
150 Metadata* _vm_result_metadata; // non-oop result
151
152 // See ReduceInitialCardMarks: this holds the precise space interval of
153 // the most recent slow path allocation for which compiled code has
154 // elided card-marks for performance along the fast-path.
155 MemRegion _deferred_card_mark;
156
157 ObjectMonitor* volatile _current_pending_monitor; // ObjectMonitor this thread is waiting to lock
158 bool _current_pending_monitor_is_from_java; // locking is from Java code
159 ObjectMonitor* volatile _current_waiting_monitor; // ObjectMonitor on which this thread called Object.wait()
160
161 // Active_handles points to a block of handles
162 JNIHandleBlock* _active_handles;
163
164 // One-element thread local free list
165 JNIHandleBlock* _free_handle_block;
166
167 // ID used as owner for inflated monitors. Same as the j.l.Thread.tid of the
168 // current _vthread object, except during creation of the primordial and JNI
169 // attached thread cases where this field can have a temporary value.
170 int64_t _monitor_owner_id;
759 void set_vframe_array_last(vframeArray* value) { _vframe_array_last = value; }
760 vframeArray* vframe_array_last() const { return _vframe_array_last; }
761
762 // The special resourceMark used during deoptimization
763
764 void set_deopt_mark(DeoptResourceMark* value) { _deopt_mark = value; }
765 DeoptResourceMark* deopt_mark(void) { return _deopt_mark; }
766
767 void set_deopt_compiled_method(nmethod* nm) { _deopt_nmethod = nm; }
768 nmethod* deopt_compiled_method() { return _deopt_nmethod; }
769
770 Method* callee_target() const { return _callee_target; }
771 void set_callee_target (Method* x) { _callee_target = x; }
772
773 // Oop results of vm runtime calls
774 oop vm_result_oop() const { return _vm_result_oop; }
775 void set_vm_result_oop(oop x) { _vm_result_oop = x; }
776
777 void set_vm_result_metadata(Metadata* x) { _vm_result_metadata = x; }
778
779 MemRegion deferred_card_mark() const { return _deferred_card_mark; }
780 void set_deferred_card_mark(MemRegion mr) { _deferred_card_mark = mr; }
781
782 // Is thread in scope of an InternalOOMEMark?
783 bool is_in_internal_oome_mark() const { return _is_in_internal_oome_mark; }
784 void set_is_in_internal_oome_mark(bool b) { _is_in_internal_oome_mark = b; }
785
786 #if INCLUDE_JVMCI
787 jlong pending_failed_speculation() const { return _pending_failed_speculation; }
788 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; }
789 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; }
790 void set_pending_failed_speculation(jlong failed_speculation) { _pending_failed_speculation = failed_speculation; }
791 void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; }
792 void set_jvmci_alternate_call_target(address a) { assert(_jvmci._alternate_call_target == nullptr, "must be"); _jvmci._alternate_call_target = a; }
793 void set_jvmci_implicit_exception_pc(address a) { assert(_jvmci._implicit_exception_pc == nullptr, "must be"); _jvmci._implicit_exception_pc = a; }
794
795 JVMCIRuntime* libjvmci_runtime() const { return _libjvmci_runtime; }
796 void set_libjvmci_runtime(JVMCIRuntime* rt) {
797 assert((_libjvmci_runtime == nullptr && rt != nullptr) || (_libjvmci_runtime != nullptr && rt == nullptr), "must be");
798 _libjvmci_runtime = rt;
824
825 // For assembly stub generation
826 static ByteSize threadObj_offset() { return byte_offset_of(JavaThread, _threadObj); }
827 static ByteSize vthread_offset() { return byte_offset_of(JavaThread, _vthread); }
828 static ByteSize jni_environment_offset() { return byte_offset_of(JavaThread, _jni_environment); }
829 static ByteSize pending_jni_exception_check_fn_offset() {
830 return byte_offset_of(JavaThread, _pending_jni_exception_check_fn);
831 }
832 static ByteSize last_Java_sp_offset() {
833 return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_sp_offset();
834 }
835 static ByteSize last_Java_pc_offset() {
836 return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_pc_offset();
837 }
838 static ByteSize frame_anchor_offset() {
839 return byte_offset_of(JavaThread, _anchor);
840 }
841 static ByteSize callee_target_offset() { return byte_offset_of(JavaThread, _callee_target); }
842 static ByteSize vm_result_oop_offset() { return byte_offset_of(JavaThread, _vm_result_oop); }
843 static ByteSize vm_result_metadata_offset() { return byte_offset_of(JavaThread, _vm_result_metadata); }
844 static ByteSize thread_state_offset() { return byte_offset_of(JavaThread, _thread_state); }
845 static ByteSize saved_exception_pc_offset() { return byte_offset_of(JavaThread, _saved_exception_pc); }
846 static ByteSize osthread_offset() { return byte_offset_of(JavaThread, _osthread); }
847 #if INCLUDE_JVMCI
848 static ByteSize pending_deoptimization_offset() { return byte_offset_of(JavaThread, _pending_deoptimization); }
849 static ByteSize pending_monitorenter_offset() { return byte_offset_of(JavaThread, _pending_monitorenter); }
850 static ByteSize jvmci_alternate_call_target_offset() { return byte_offset_of(JavaThread, _jvmci._alternate_call_target); }
851 static ByteSize jvmci_implicit_exception_pc_offset() { return byte_offset_of(JavaThread, _jvmci._implicit_exception_pc); }
852 static ByteSize jvmci_counters_offset() { return byte_offset_of(JavaThread, _jvmci_counters); }
853 #endif // INCLUDE_JVMCI
854 static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop); }
855 static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc); }
856 static ByteSize exception_handler_pc_offset() { return byte_offset_of(JavaThread, _exception_handler_pc); }
857
858 static ByteSize active_handles_offset() { return byte_offset_of(JavaThread, _active_handles); }
859
860 // StackOverflow offsets
861 static ByteSize stack_overflow_limit_offset() {
862 return byte_offset_of(JavaThread, _stack_overflow_state._stack_overflow_limit);
863 }
|
131 vframeArray* _vframe_array_head; // Holds the heap of the active vframeArrays
132 vframeArray* _vframe_array_last; // Holds last vFrameArray we popped
133 // Holds updates by JVMTI agents for compiled frames that cannot be performed immediately. They
134 // will be carried out as soon as possible which, in most cases, is just before deoptimization of
135 // the frame, when control returns to it.
136 JvmtiDeferredUpdates* _jvmti_deferred_updates;
137
138 // Handshake value for fixing 6243940. We need a place for the i2c
139 // adapter to store the callee Method*. This value is NEVER live
140 // across a gc point so it does NOT have to be gc'd
141 // The handshake is open ended since we can't be certain that it will
142 // be nulled. This is because we rarely ever see the race and end up
143 // in handle_wrong_method which is the backend of the handshake. See
144 // code in i2c adapters and handle_wrong_method.
145
146 Method* _callee_target;
147
148 // Used to pass back results to the interpreter or generated code running Java code.
149 oop _vm_result_oop; // oop result is GC-preserved
150 Metadata* _vm_result_metadata; // non-oop result
151 oop _return_buffered_value; // buffered value being returned
152
153 // See ReduceInitialCardMarks: this holds the precise space interval of
154 // the most recent slow path allocation for which compiled code has
155 // elided card-marks for performance along the fast-path.
156 MemRegion _deferred_card_mark;
157
158 ObjectMonitor* volatile _current_pending_monitor; // ObjectMonitor this thread is waiting to lock
159 bool _current_pending_monitor_is_from_java; // locking is from Java code
160 ObjectMonitor* volatile _current_waiting_monitor; // ObjectMonitor on which this thread called Object.wait()
161
162 // Active_handles points to a block of handles
163 JNIHandleBlock* _active_handles;
164
165 // One-element thread local free list
166 JNIHandleBlock* _free_handle_block;
167
168 // ID used as owner for inflated monitors. Same as the j.l.Thread.tid of the
169 // current _vthread object, except during creation of the primordial and JNI
170 // attached thread cases where this field can have a temporary value.
171 int64_t _monitor_owner_id;
760 void set_vframe_array_last(vframeArray* value) { _vframe_array_last = value; }
761 vframeArray* vframe_array_last() const { return _vframe_array_last; }
762
763 // The special resourceMark used during deoptimization
764
765 void set_deopt_mark(DeoptResourceMark* value) { _deopt_mark = value; }
766 DeoptResourceMark* deopt_mark(void) { return _deopt_mark; }
767
768 void set_deopt_compiled_method(nmethod* nm) { _deopt_nmethod = nm; }
769 nmethod* deopt_compiled_method() { return _deopt_nmethod; }
770
771 Method* callee_target() const { return _callee_target; }
772 void set_callee_target (Method* x) { _callee_target = x; }
773
774 // Oop results of vm runtime calls
775 oop vm_result_oop() const { return _vm_result_oop; }
776 void set_vm_result_oop(oop x) { _vm_result_oop = x; }
777
778 void set_vm_result_metadata(Metadata* x) { _vm_result_metadata = x; }
779
780 oop return_buffered_value() const { return _return_buffered_value; }
781 void set_return_buffered_value(oop val) { _return_buffered_value = val; }
782
783 MemRegion deferred_card_mark() const { return _deferred_card_mark; }
784 void set_deferred_card_mark(MemRegion mr) { _deferred_card_mark = mr; }
785
786 // Is thread in scope of an InternalOOMEMark?
787 bool is_in_internal_oome_mark() const { return _is_in_internal_oome_mark; }
788 void set_is_in_internal_oome_mark(bool b) { _is_in_internal_oome_mark = b; }
789
790 #if INCLUDE_JVMCI
791 jlong pending_failed_speculation() const { return _pending_failed_speculation; }
792 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; }
793 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; }
794 void set_pending_failed_speculation(jlong failed_speculation) { _pending_failed_speculation = failed_speculation; }
795 void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; }
796 void set_jvmci_alternate_call_target(address a) { assert(_jvmci._alternate_call_target == nullptr, "must be"); _jvmci._alternate_call_target = a; }
797 void set_jvmci_implicit_exception_pc(address a) { assert(_jvmci._implicit_exception_pc == nullptr, "must be"); _jvmci._implicit_exception_pc = a; }
798
799 JVMCIRuntime* libjvmci_runtime() const { return _libjvmci_runtime; }
800 void set_libjvmci_runtime(JVMCIRuntime* rt) {
801 assert((_libjvmci_runtime == nullptr && rt != nullptr) || (_libjvmci_runtime != nullptr && rt == nullptr), "must be");
802 _libjvmci_runtime = rt;
828
829 // For assembly stub generation
830 static ByteSize threadObj_offset() { return byte_offset_of(JavaThread, _threadObj); }
831 static ByteSize vthread_offset() { return byte_offset_of(JavaThread, _vthread); }
832 static ByteSize jni_environment_offset() { return byte_offset_of(JavaThread, _jni_environment); }
833 static ByteSize pending_jni_exception_check_fn_offset() {
834 return byte_offset_of(JavaThread, _pending_jni_exception_check_fn);
835 }
836 static ByteSize last_Java_sp_offset() {
837 return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_sp_offset();
838 }
839 static ByteSize last_Java_pc_offset() {
840 return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_pc_offset();
841 }
842 static ByteSize frame_anchor_offset() {
843 return byte_offset_of(JavaThread, _anchor);
844 }
845 static ByteSize callee_target_offset() { return byte_offset_of(JavaThread, _callee_target); }
846 static ByteSize vm_result_oop_offset() { return byte_offset_of(JavaThread, _vm_result_oop); }
847 static ByteSize vm_result_metadata_offset() { return byte_offset_of(JavaThread, _vm_result_metadata); }
848 static ByteSize return_buffered_value_offset() { return byte_offset_of(JavaThread, _return_buffered_value); }
849 static ByteSize thread_state_offset() { return byte_offset_of(JavaThread, _thread_state); }
850 static ByteSize saved_exception_pc_offset() { return byte_offset_of(JavaThread, _saved_exception_pc); }
851 static ByteSize osthread_offset() { return byte_offset_of(JavaThread, _osthread); }
852 #if INCLUDE_JVMCI
853 static ByteSize pending_deoptimization_offset() { return byte_offset_of(JavaThread, _pending_deoptimization); }
854 static ByteSize pending_monitorenter_offset() { return byte_offset_of(JavaThread, _pending_monitorenter); }
855 static ByteSize jvmci_alternate_call_target_offset() { return byte_offset_of(JavaThread, _jvmci._alternate_call_target); }
856 static ByteSize jvmci_implicit_exception_pc_offset() { return byte_offset_of(JavaThread, _jvmci._implicit_exception_pc); }
857 static ByteSize jvmci_counters_offset() { return byte_offset_of(JavaThread, _jvmci_counters); }
858 #endif // INCLUDE_JVMCI
859 static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop); }
860 static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc); }
861 static ByteSize exception_handler_pc_offset() { return byte_offset_of(JavaThread, _exception_handler_pc); }
862
863 static ByteSize active_handles_offset() { return byte_offset_of(JavaThread, _active_handles); }
864
865 // StackOverflow offsets
866 static ByteSize stack_overflow_limit_offset() {
867 return byte_offset_of(JavaThread, _stack_overflow_state._stack_overflow_limit);
868 }
|