< prev index next >

src/share/vm/runtime/thread.hpp

Print this page

        

*** 262,273 **** --- 262,276 ---- friend class Pause_No_Safepoint_Verifier; friend class ThreadLocalStorage; friend class GC_locker; ThreadLocalAllocBuffer _tlab; // Thread-local eden + ThreadLocalAllocBuffer _gclab; // Thread-local allocation buffer for GC (e.g. evacuation) jlong _allocated_bytes; // Cumulative number of bytes allocated on // the Java heap + jlong _allocated_bytes_gclab; // Cumulative number of bytes allocated on + // the Java heap, in GCLABs TRACE_DATA _trace_data; // Thread-local data for tracing ThreadExt _ext;
*** 279,288 **** --- 282,293 ---- bool _current_pending_monitor_is_from_java; // locking is from Java code // ObjectMonitor on which this thread called Object.wait() ObjectMonitor* _current_waiting_monitor; + bool _evacuating; + // Private thread-local objectmonitor list - a simple cache organized as a SLL. public: ObjectMonitor* omFreeList; int omFreeCount; // length of omFreeList int omFreeProvision; // reload chunk size
*** 422,440 **** // Thread-Local Allocation Buffer (TLAB) support ThreadLocalAllocBuffer& tlab() { return _tlab; } void initialize_tlab() { if (UseTLAB) { ! tlab().initialize(); } } 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; } --- 427,453 ---- // Thread-Local Allocation Buffer (TLAB) support ThreadLocalAllocBuffer& tlab() { return _tlab; } void initialize_tlab() { if (UseTLAB) { ! tlab().initialize(false); ! gclab().initialize(true); } } + // Thread-Local GC Allocation Buffer (GCLAB) support + ThreadLocalAllocBuffer& gclab() { return _gclab; } + 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(); + jlong allocated_bytes_gclab() { return _allocated_bytes_gclab; } + void set_allocated_bytes_gclab(jlong value) { _allocated_bytes_gclab = value; } + void incr_allocated_bytes_gclab(jlong size) { _allocated_bytes_gclab += size; } + TRACE_DATA* trace_data() { return &_trace_data; } const ThreadExt& ext() const { return _ext; } ThreadExt& ext() { return _ext; }
*** 463,472 **** --- 476,493 ---- } void set_current_waiting_monitor(ObjectMonitor* monitor) { _current_waiting_monitor = monitor; } + bool is_evacuating() { + return _evacuating; + } + + void set_evacuating(bool evacuating) { + _evacuating = evacuating; + } + // GC support // Apply "f->do_oop" to all root oops in "this". // Apply "cld_f->do_cld" to CLDs that are otherwise not kept alive. // Used by JavaThread::oops_do. // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames
*** 612,621 **** --- 633,644 ---- TLAB_FIELD_OFFSET(fast_refill_waste) TLAB_FIELD_OFFSET(slow_allocations) #undef TLAB_FIELD_OFFSET + static ByteSize gclab_start_offset() { return byte_offset_of(Thread, _gclab) + ThreadLocalAllocBuffer::start_offset(); } + static ByteSize allocated_bytes_offset() { return byte_offset_of(Thread, _allocated_bytes); } public: volatile intptr_t _Stalled; volatile int _TypeTag;
*** 954,963 **** --- 977,990 ---- DirtyCardQueue _dirty_card_queue; // Thread-local log for dirty cards. // Set of all such queues. static DirtyCardQueueSet _dirty_card_queue_set; void flush_barrier_queues(); + + bool _evacuation_in_progress; + static bool _evacuation_in_progress_global; + #endif // INCLUDE_ALL_GCS friend class VMThread; friend class ThreadWaitTransition; friend class VM_Exit;
*** 1373,1382 **** --- 1400,1412 ---- } #if INCLUDE_ALL_GCS static ByteSize satb_mark_queue_offset() { return byte_offset_of(JavaThread, _satb_mark_queue); } static ByteSize dirty_card_queue_offset() { return byte_offset_of(JavaThread, _dirty_card_queue); } + + static ByteSize evacuation_in_progress_offset() { return byte_offset_of(JavaThread, _evacuation_in_progress); } + #endif // INCLUDE_ALL_GCS // Returns the jni environment for this thread JNIEnv* jni_environment() { return &_jni_environment; }
*** 1669,1678 **** --- 1699,1714 ---- // Dirty card queue support DirtyCardQueue& dirty_card_queue() { return _dirty_card_queue; } static DirtyCardQueueSet& dirty_card_queue_set() { return _dirty_card_queue_set; } + + bool evacuation_in_progress() const; + + void set_evacuation_in_progress(bool in_prog); + + static void set_evacuation_in_progress_all_threads(bool in_prog); #endif // INCLUDE_ALL_GCS // This method initializes the SATB and dirty card queues before a // JavaThread is added to the Java thread list. Right now, we don't // have to do anything to the dirty card queue (it should have been
< prev index next >