40 #include "runtime/safepoint.hpp" |
40 #include "runtime/safepoint.hpp" |
41 #include "runtime/stubRoutines.hpp" |
41 #include "runtime/stubRoutines.hpp" |
42 #include "runtime/threadLocalStorage.hpp" |
42 #include "runtime/threadLocalStorage.hpp" |
43 #include "runtime/thread_ext.hpp" |
43 #include "runtime/thread_ext.hpp" |
44 #include "runtime/unhandledOops.hpp" |
44 #include "runtime/unhandledOops.hpp" |
45 #include "trace/traceBackend.hpp" |
|
46 #include "trace/traceMacros.hpp" |
|
47 #include "utilities/exceptions.hpp" |
45 #include "utilities/exceptions.hpp" |
48 #include "utilities/macros.hpp" |
46 #include "utilities/macros.hpp" |
49 #include "utilities/top.hpp" |
47 #include "utilities/top.hpp" |
50 #if INCLUDE_ALL_GCS |
48 #if INCLUDE_ALL_GCS |
51 #include "gc_implementation/g1/dirtyCardQueue.hpp" |
49 #include "gc_implementation/g1/dirtyCardQueue.hpp" |
52 #include "gc_implementation/g1/satbQueue.hpp" |
50 #include "gc_implementation/g1/satbQueue.hpp" |
53 #endif // INCLUDE_ALL_GCS |
51 #endif // INCLUDE_ALL_GCS |
54 #ifdef TARGET_ARCH_zero |
52 #ifdef TARGET_ARCH_zero |
55 # include "stack_zero.hpp" |
53 # include "stack_zero.hpp" |
|
54 #endif |
|
55 #if INCLUDE_JFR |
|
56 #include "jfr/support/jfrThreadExtension.hpp" |
56 #endif |
57 #endif |
57 |
58 |
58 class ThreadSafepointState; |
59 class ThreadSafepointState; |
59 class ThreadProfiler; |
60 class ThreadProfiler; |
60 |
61 |
258 // the Java heap |
259 // the Java heap |
259 |
260 |
260 // Thread-local buffer used by MetadataOnStackMark. |
261 // Thread-local buffer used by MetadataOnStackMark. |
261 MetadataOnStackBuffer* _metadata_on_stack_buffer; |
262 MetadataOnStackBuffer* _metadata_on_stack_buffer; |
262 |
263 |
263 TRACE_DATA _trace_data; // Thread-local data for tracing |
264 JFR_ONLY(DEFINE_THREAD_LOCAL_FIELD_JFR;) // Thread-local data for jfr |
264 |
265 |
265 ThreadExt _ext; |
266 ThreadExt _ext; |
266 |
267 |
267 int _vm_operation_started_count; // VM_Operation support |
268 int _vm_operation_started_count; // VM_Operation support |
268 int _vm_operation_completed_count; // VM_Operation support |
269 int _vm_operation_completed_count; // VM_Operation support |
439 jlong allocated_bytes() { return _allocated_bytes; } |
440 jlong allocated_bytes() { return _allocated_bytes; } |
440 void set_allocated_bytes(jlong value) { _allocated_bytes = value; } |
441 void set_allocated_bytes(jlong value) { _allocated_bytes = value; } |
441 void incr_allocated_bytes(jlong size) { _allocated_bytes += size; } |
442 void incr_allocated_bytes(jlong size) { _allocated_bytes += size; } |
442 inline jlong cooked_allocated_bytes(); |
443 inline jlong cooked_allocated_bytes(); |
443 |
444 |
444 TRACE_DATA* trace_data() { return &_trace_data; } |
445 JFR_ONLY(DEFINE_THREAD_LOCAL_ACCESSOR_JFR;) |
445 |
446 |
446 const ThreadExt& ext() const { return _ext; } |
447 const ThreadExt& ext() const { return _ext; } |
447 ThreadExt& ext() { return _ext; } |
448 ThreadExt& ext() { return _ext; } |
448 |
449 |
449 // VM operation support |
450 // VM operation support |
623 TLAB_FIELD_OFFSET(slow_allocations) |
624 TLAB_FIELD_OFFSET(slow_allocations) |
624 |
625 |
625 #undef TLAB_FIELD_OFFSET |
626 #undef TLAB_FIELD_OFFSET |
626 |
627 |
627 static ByteSize allocated_bytes_offset() { return byte_offset_of(Thread, _allocated_bytes ); } |
628 static ByteSize allocated_bytes_offset() { return byte_offset_of(Thread, _allocated_bytes ); } |
|
629 |
|
630 JFR_ONLY(DEFINE_THREAD_LOCAL_OFFSET_JFR;) |
628 |
631 |
629 public: |
632 public: |
630 volatile intptr_t _Stalled ; |
633 volatile intptr_t _Stalled ; |
631 volatile int _TypeTag ; |
634 volatile int _TypeTag ; |
632 ParkEvent * _ParkEvent ; // for synchronized() |
635 ParkEvent * _ParkEvent ; // for synchronized() |