< prev index next >

src/share/vm/runtime/thread.hpp

Print this page

        

*** 40,61 **** #include "runtime/safepoint.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/threadLocalStorage.hpp" #include "runtime/thread_ext.hpp" #include "runtime/unhandledOops.hpp" - #include "trace/traceBackend.hpp" - #include "trace/traceMacros.hpp" #include "utilities/exceptions.hpp" #include "utilities/macros.hpp" #include "utilities/top.hpp" #if INCLUDE_ALL_GCS #include "gc_implementation/g1/dirtyCardQueue.hpp" #include "gc_implementation/g1/satbQueue.hpp" #endif // INCLUDE_ALL_GCS #ifdef TARGET_ARCH_zero # include "stack_zero.hpp" #endif class ThreadSafepointState; class ThreadProfiler; class JvmtiThreadState; --- 40,62 ---- #include "runtime/safepoint.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/threadLocalStorage.hpp" #include "runtime/thread_ext.hpp" #include "runtime/unhandledOops.hpp" #include "utilities/exceptions.hpp" #include "utilities/macros.hpp" #include "utilities/top.hpp" #if INCLUDE_ALL_GCS #include "gc_implementation/g1/dirtyCardQueue.hpp" #include "gc_implementation/g1/satbQueue.hpp" #endif // INCLUDE_ALL_GCS #ifdef TARGET_ARCH_zero # include "stack_zero.hpp" #endif + #if INCLUDE_JFR + #include "jfr/support/jfrThreadExtension.hpp" + #endif class ThreadSafepointState; class ThreadProfiler; class JvmtiThreadState;
*** 193,203 **** _external_suspend = 0x20000000U, // thread is asked to self suspend _ext_suspended = 0x40000000U, // thread has self-suspended _deopt_suspend = 0x10000000U, // thread needs to self suspend for deopt _has_async_exception = 0x00000001U, // there is a pending async exception ! _critical_native_unlock = 0x00000002U // Must call back to unlock JNI critical lock }; // various suspension related flags - atomically updated // overloaded for async exception checking in check_special_condition_for_native_trans. volatile uint32_t _suspend_flags; --- 194,206 ---- _external_suspend = 0x20000000U, // thread is asked to self suspend _ext_suspended = 0x40000000U, // thread has self-suspended _deopt_suspend = 0x10000000U, // thread needs to self suspend for deopt _has_async_exception = 0x00000001U, // there is a pending async exception ! _critical_native_unlock = 0x00000002U, // Must call back to unlock JNI critical lock ! ! JFR_ONLY(_trace_flag = 0x00000004U) // call jfr tracing }; // various suspension related flags - atomically updated // overloaded for async exception checking in check_special_condition_for_native_trans. volatile uint32_t _suspend_flags;
*** 258,268 **** // the Java heap // Thread-local buffer used by MetadataOnStackMark. MetadataOnStackBuffer* _metadata_on_stack_buffer; ! TRACE_DATA _trace_data; // Thread-local data for tracing ThreadExt _ext; int _vm_operation_started_count; // VM_Operation support int _vm_operation_completed_count; // VM_Operation support --- 261,271 ---- // the Java heap // Thread-local buffer used by MetadataOnStackMark. MetadataOnStackBuffer* _metadata_on_stack_buffer; ! JFR_ONLY(DEFINE_THREAD_LOCAL_FIELD_JFR;) // Thread-local data for jfr ThreadExt _ext; int _vm_operation_started_count; // VM_Operation support int _vm_operation_completed_count; // VM_Operation support
*** 439,449 **** jlong allocated_bytes() { return _allocated_bytes; } void set_allocated_bytes(jlong value) { _allocated_bytes = value; } void incr_allocated_bytes(jlong size) { _allocated_bytes += size; } inline jlong cooked_allocated_bytes(); ! TRACE_DATA* trace_data() { return &_trace_data; } const ThreadExt& ext() const { return _ext; } ThreadExt& ext() { return _ext; } // VM operation support --- 442,453 ---- jlong allocated_bytes() { return _allocated_bytes; } void set_allocated_bytes(jlong value) { _allocated_bytes = value; } void incr_allocated_bytes(jlong size) { _allocated_bytes += size; } inline jlong cooked_allocated_bytes(); ! JFR_ONLY(DEFINE_THREAD_LOCAL_ACCESSOR_JFR;) ! JFR_ONLY(DEFINE_TRACE_SUSPEND_FLAG_METHODS) const ThreadExt& ext() const { return _ext; } ThreadExt& ext() { return _ext; } // VM operation support
*** 624,633 **** --- 628,639 ---- #undef TLAB_FIELD_OFFSET static ByteSize allocated_bytes_offset() { return byte_offset_of(Thread, _allocated_bytes ); } + JFR_ONLY(DEFINE_THREAD_LOCAL_OFFSET_JFR;) + public: volatile intptr_t _Stalled ; volatile int _TypeTag ; ParkEvent * _ParkEvent ; // for synchronized() ParkEvent * _SleepEvent ; // for Thread.sleep
*** 726,737 **** private: static WatcherThread* _watcher_thread; static bool _startable; volatile static bool _should_terminate; // updated without holding lock - - os::WatcherThreadCrashProtection* _crash_protection; public: enum SomeConstants { delay_interval = 10 // interrupt delay in milliseconds }; --- 732,741 ----
*** 754,772 **** static void start(); static void stop(); // Only allow start once the VM is sufficiently initialized // Otherwise the first task to enroll will trigger the start static void make_startable(); - - void set_crash_protection(os::WatcherThreadCrashProtection* crash_protection) { - assert(Thread::current()->is_Watcher_thread(), "Can only be set by WatcherThread"); - _crash_protection = crash_protection; - } - - bool has_crash_protection() const { return _crash_protection != NULL; } - os::WatcherThreadCrashProtection* crash_protection() const { return _crash_protection; } - private: int sleep() const; }; --- 758,767 ----
< prev index next >