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 ObjectMonitor* volatile _current_pending_monitor; // ObjectMonitor this thread is waiting to lock
153 bool _current_pending_monitor_is_from_java; // locking is from Java code
154 ObjectMonitor* volatile _current_waiting_monitor; // ObjectMonitor on which this thread called Object.wait()
155
156 // Active_handles points to a block of handles
157 JNIHandleBlock* _active_handles;
158
159 // One-element thread local free list
160 JNIHandleBlock* _free_handle_block;
161
162 // ID used as owner for inflated monitors. Same as the j.l.Thread.tid of the
163 // current _vthread object, except during creation of the primordial and JNI
164 // attached thread cases where this field can have a temporary value.
165 int64_t _monitor_owner_id;
166
167 public:
168 void set_monitor_owner_id(int64_t id) {
169 ThreadIdentifier::verify_id(id);
170 _monitor_owner_id = id;
754 void set_vframe_array_last(vframeArray* value) { _vframe_array_last = value; }
755 vframeArray* vframe_array_last() const { return _vframe_array_last; }
756
757 // The special resourceMark used during deoptimization
758
759 void set_deopt_mark(DeoptResourceMark* value) { _deopt_mark = value; }
760 DeoptResourceMark* deopt_mark(void) { return _deopt_mark; }
761
762 void set_deopt_compiled_method(nmethod* nm) { _deopt_nmethod = nm; }
763 nmethod* deopt_compiled_method() { return _deopt_nmethod; }
764
765 Method* callee_target() const { return _callee_target; }
766 void set_callee_target (Method* x) { _callee_target = x; }
767
768 // Oop results of vm runtime calls
769 oop vm_result_oop() const { return _vm_result_oop; }
770 void set_vm_result_oop(oop x) { _vm_result_oop = x; }
771
772 void set_vm_result_metadata(Metadata* x) { _vm_result_metadata = x; }
773
774 // Is thread in scope of an InternalOOMEMark?
775 bool is_in_internal_oome_mark() const { return _is_in_internal_oome_mark; }
776 void set_is_in_internal_oome_mark(bool b) { _is_in_internal_oome_mark = b; }
777
778 #if INCLUDE_JVMCI
779 jlong pending_failed_speculation() const { return _pending_failed_speculation; }
780 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; }
781 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; }
782 void set_pending_failed_speculation(jlong failed_speculation) { _pending_failed_speculation = failed_speculation; }
783 void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; }
784 void set_jvmci_alternate_call_target(address a) { assert(_jvmci._alternate_call_target == nullptr, "must be"); _jvmci._alternate_call_target = a; }
785 void set_jvmci_implicit_exception_pc(address a) { assert(_jvmci._implicit_exception_pc == nullptr, "must be"); _jvmci._implicit_exception_pc = a; }
786
787 JVMCIRuntime* libjvmci_runtime() const { return _libjvmci_runtime; }
788 void set_libjvmci_runtime(JVMCIRuntime* rt) {
789 assert((_libjvmci_runtime == nullptr && rt != nullptr) || (_libjvmci_runtime != nullptr && rt == nullptr), "must be");
790 _libjvmci_runtime = rt;
791 }
792 #endif // INCLUDE_JVMCI
793
816
817 // For assembly stub generation
818 static ByteSize threadObj_offset() { return byte_offset_of(JavaThread, _threadObj); }
819 static ByteSize vthread_offset() { return byte_offset_of(JavaThread, _vthread); }
820 static ByteSize jni_environment_offset() { return byte_offset_of(JavaThread, _jni_environment); }
821 static ByteSize pending_jni_exception_check_fn_offset() {
822 return byte_offset_of(JavaThread, _pending_jni_exception_check_fn);
823 }
824 static ByteSize last_Java_sp_offset() {
825 return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_sp_offset();
826 }
827 static ByteSize last_Java_pc_offset() {
828 return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_pc_offset();
829 }
830 static ByteSize frame_anchor_offset() {
831 return byte_offset_of(JavaThread, _anchor);
832 }
833 static ByteSize callee_target_offset() { return byte_offset_of(JavaThread, _callee_target); }
834 static ByteSize vm_result_oop_offset() { return byte_offset_of(JavaThread, _vm_result_oop); }
835 static ByteSize vm_result_metadata_offset() { return byte_offset_of(JavaThread, _vm_result_metadata); }
836 static ByteSize thread_state_offset() { return byte_offset_of(JavaThread, _thread_state); }
837 static ByteSize saved_exception_pc_offset() { return byte_offset_of(JavaThread, _saved_exception_pc); }
838 static ByteSize osthread_offset() { return byte_offset_of(JavaThread, _osthread); }
839 #if INCLUDE_JVMCI
840 static ByteSize pending_deoptimization_offset() { return byte_offset_of(JavaThread, _pending_deoptimization); }
841 static ByteSize pending_monitorenter_offset() { return byte_offset_of(JavaThread, _pending_monitorenter); }
842 static ByteSize jvmci_alternate_call_target_offset() { return byte_offset_of(JavaThread, _jvmci._alternate_call_target); }
843 static ByteSize jvmci_implicit_exception_pc_offset() { return byte_offset_of(JavaThread, _jvmci._implicit_exception_pc); }
844 static ByteSize jvmci_counters_offset() { return byte_offset_of(JavaThread, _jvmci_counters); }
845 #endif // INCLUDE_JVMCI
846 static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop); }
847 static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc); }
848 static ByteSize exception_handler_pc_offset() { return byte_offset_of(JavaThread, _exception_handler_pc); }
849
850 static ByteSize active_handles_offset() { return byte_offset_of(JavaThread, _active_handles); }
851
852 // StackOverflow offsets
853 static ByteSize stack_overflow_limit_offset() {
854 return byte_offset_of(JavaThread, _stack_overflow_state._stack_overflow_limit);
855 }
|
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 ObjectMonitor* volatile _current_pending_monitor; // ObjectMonitor this thread is waiting to lock
154 bool _current_pending_monitor_is_from_java; // locking is from Java code
155 ObjectMonitor* volatile _current_waiting_monitor; // ObjectMonitor on which this thread called Object.wait()
156
157 // Active_handles points to a block of handles
158 JNIHandleBlock* _active_handles;
159
160 // One-element thread local free list
161 JNIHandleBlock* _free_handle_block;
162
163 // ID used as owner for inflated monitors. Same as the j.l.Thread.tid of the
164 // current _vthread object, except during creation of the primordial and JNI
165 // attached thread cases where this field can have a temporary value.
166 int64_t _monitor_owner_id;
167
168 public:
169 void set_monitor_owner_id(int64_t id) {
170 ThreadIdentifier::verify_id(id);
171 _monitor_owner_id = id;
755 void set_vframe_array_last(vframeArray* value) { _vframe_array_last = value; }
756 vframeArray* vframe_array_last() const { return _vframe_array_last; }
757
758 // The special resourceMark used during deoptimization
759
760 void set_deopt_mark(DeoptResourceMark* value) { _deopt_mark = value; }
761 DeoptResourceMark* deopt_mark(void) { return _deopt_mark; }
762
763 void set_deopt_compiled_method(nmethod* nm) { _deopt_nmethod = nm; }
764 nmethod* deopt_compiled_method() { return _deopt_nmethod; }
765
766 Method* callee_target() const { return _callee_target; }
767 void set_callee_target (Method* x) { _callee_target = x; }
768
769 // Oop results of vm runtime calls
770 oop vm_result_oop() const { return _vm_result_oop; }
771 void set_vm_result_oop(oop x) { _vm_result_oop = x; }
772
773 void set_vm_result_metadata(Metadata* x) { _vm_result_metadata = x; }
774
775 oop return_buffered_value() const { return _return_buffered_value; }
776 void set_return_buffered_value(oop val) { _return_buffered_value = val; }
777
778 // Is thread in scope of an InternalOOMEMark?
779 bool is_in_internal_oome_mark() const { return _is_in_internal_oome_mark; }
780 void set_is_in_internal_oome_mark(bool b) { _is_in_internal_oome_mark = b; }
781
782 #if INCLUDE_JVMCI
783 jlong pending_failed_speculation() const { return _pending_failed_speculation; }
784 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; }
785 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; }
786 void set_pending_failed_speculation(jlong failed_speculation) { _pending_failed_speculation = failed_speculation; }
787 void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; }
788 void set_jvmci_alternate_call_target(address a) { assert(_jvmci._alternate_call_target == nullptr, "must be"); _jvmci._alternate_call_target = a; }
789 void set_jvmci_implicit_exception_pc(address a) { assert(_jvmci._implicit_exception_pc == nullptr, "must be"); _jvmci._implicit_exception_pc = a; }
790
791 JVMCIRuntime* libjvmci_runtime() const { return _libjvmci_runtime; }
792 void set_libjvmci_runtime(JVMCIRuntime* rt) {
793 assert((_libjvmci_runtime == nullptr && rt != nullptr) || (_libjvmci_runtime != nullptr && rt == nullptr), "must be");
794 _libjvmci_runtime = rt;
795 }
796 #endif // INCLUDE_JVMCI
797
820
821 // For assembly stub generation
822 static ByteSize threadObj_offset() { return byte_offset_of(JavaThread, _threadObj); }
823 static ByteSize vthread_offset() { return byte_offset_of(JavaThread, _vthread); }
824 static ByteSize jni_environment_offset() { return byte_offset_of(JavaThread, _jni_environment); }
825 static ByteSize pending_jni_exception_check_fn_offset() {
826 return byte_offset_of(JavaThread, _pending_jni_exception_check_fn);
827 }
828 static ByteSize last_Java_sp_offset() {
829 return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_sp_offset();
830 }
831 static ByteSize last_Java_pc_offset() {
832 return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_pc_offset();
833 }
834 static ByteSize frame_anchor_offset() {
835 return byte_offset_of(JavaThread, _anchor);
836 }
837 static ByteSize callee_target_offset() { return byte_offset_of(JavaThread, _callee_target); }
838 static ByteSize vm_result_oop_offset() { return byte_offset_of(JavaThread, _vm_result_oop); }
839 static ByteSize vm_result_metadata_offset() { return byte_offset_of(JavaThread, _vm_result_metadata); }
840 static ByteSize return_buffered_value_offset() { return byte_offset_of(JavaThread, _return_buffered_value); }
841 static ByteSize thread_state_offset() { return byte_offset_of(JavaThread, _thread_state); }
842 static ByteSize saved_exception_pc_offset() { return byte_offset_of(JavaThread, _saved_exception_pc); }
843 static ByteSize osthread_offset() { return byte_offset_of(JavaThread, _osthread); }
844 #if INCLUDE_JVMCI
845 static ByteSize pending_deoptimization_offset() { return byte_offset_of(JavaThread, _pending_deoptimization); }
846 static ByteSize pending_monitorenter_offset() { return byte_offset_of(JavaThread, _pending_monitorenter); }
847 static ByteSize jvmci_alternate_call_target_offset() { return byte_offset_of(JavaThread, _jvmci._alternate_call_target); }
848 static ByteSize jvmci_implicit_exception_pc_offset() { return byte_offset_of(JavaThread, _jvmci._implicit_exception_pc); }
849 static ByteSize jvmci_counters_offset() { return byte_offset_of(JavaThread, _jvmci_counters); }
850 #endif // INCLUDE_JVMCI
851 static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop); }
852 static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc); }
853 static ByteSize exception_handler_pc_offset() { return byte_offset_of(JavaThread, _exception_handler_pc); }
854
855 static ByteSize active_handles_offset() { return byte_offset_of(JavaThread, _active_handles); }
856
857 // StackOverflow offsets
858 static ByteSize stack_overflow_limit_offset() {
859 return byte_offset_of(JavaThread, _stack_overflow_state._stack_overflow_limit);
860 }
|