< prev index next >
src/hotspot/share/runtime/thread.hpp
Print this page
rev 48920 : [backport] Use PLAB for evacuations instead of TLAB
@@ -89,10 +89,14 @@
DEBUG_ONLY(class ResourceMark;)
class WorkerThread;
+#ifdef INCLUDE_ALL_GCS
+class PLAB;
+#endif
+
// Class hierarchy
// - Thread
// - NamedThread
// - VMThread
// - ConcurrentGCThread
@@ -319,16 +323,13 @@
friend class GCLocker;
volatile void* _polling_page; // Thread local polling page
ThreadLocalAllocBuffer _tlab; // Thread-local eden
- ThreadLocalAllocBuffer _gclab; // Thread-local allocation buffer for GC (e.g. evacuation)
+ PLAB* _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
-
mutable TRACE_DATA _trace_data; // Thread-local data for tracing
ThreadExt _ext;
int _vm_operation_started_count; // VM_Operation support
@@ -506,27 +507,22 @@
// Thread-Local Allocation Buffer (TLAB) support
ThreadLocalAllocBuffer& tlab() { return _tlab; }
void initialize_tlab() {
if (UseTLAB) {
- tlab().initialize(false);
- gclab().initialize(true);
+ tlab().initialize();
}
}
// Thread-Local GC Allocation Buffer (GCLAB) support
- ThreadLocalAllocBuffer& gclab() { return _gclab; }
-
+ PLAB* gclab() { return _gclab; }
+ void set_gclab(PLAB* gclab) { _gclab = 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_DEFINE_THREAD_TRACE_DATA_OFFSET;
TRACE_DATA* trace_data() const { return &_trace_data; }
bool is_trace_suspend() { return (_suspend_flags & _trace_flag) != 0; }
const ThreadExt& ext() const { return _ext; }
@@ -708,14 +704,10 @@
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 gclab_top_offset() { return byte_offset_of(Thread, _gclab) + ThreadLocalAllocBuffer::top_offset(); }
- static ByteSize gclab_end_offset() { return byte_offset_of(Thread, _gclab) + ThreadLocalAllocBuffer::end_offset(); }
-
static ByteSize allocated_bytes_offset() { return byte_offset_of(Thread, _allocated_bytes); }
public:
volatile intptr_t _Stalled;
volatile int _TypeTag;
< prev index next >