--- old/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp 2015-10-14 13:54:06.860067408 +0200 +++ new/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp 2015-10-14 13:54:06.769069608 +0200 @@ -59,8 +59,7 @@ AdaptiveWeightedAverage _allocation_fraction; // fraction of eden allocated in tlabs - void accumulate_statistics(); - void initialize_statistics(); + bool _gclab; void set_start(HeapWord* start) { _start = start; } void set_end(HeapWord* end) { _end = end; } @@ -79,9 +78,6 @@ // Make parsable and release it. void reset(); - // Resize based on amount of allocation, etc. - void resize(); - void invariants() const { assert(top() >= start() && top() <= end(), "invalid tlab"); } void initialize(HeapWord* start, HeapWord* top, HeapWord* end); @@ -125,11 +121,17 @@ // Allocate size HeapWords. The memory is NOT initialized to zero. inline HeapWord* allocate(size_t size); + // Resize based on amount of allocation, etc. + void resize(); + + void accumulate_statistics(); + void initialize_statistics(); + + // Rolls back a single allocation of the given size. + void rollback(size_t size); + // Reserve space at the end of TLAB - static size_t end_reserve() { - int reserve_size = typeArrayOopDesc::header_size(T_INT); - return MAX2(reserve_size, VM_Version::reserve_for_allocation_prefetch()); - } + static size_t end_reserve(); static size_t alignment_reserve() { return align_object_size(end_reserve()); } static size_t alignment_reserve_in_bytes() { return alignment_reserve() * HeapWordSize; } @@ -157,7 +159,7 @@ static void resize_all_tlabs(); void fill(HeapWord* start, HeapWord* top, size_t new_size); - void initialize(); + void initialize(bool gclab); static size_t refill_waste_limit_increment() { return TLABWasteIncrement; }