--- old/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp 2018-03-21 10:34:06.595195205 -0700 +++ new/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp 2018-03-21 10:34:06.339196083 -0700 @@ -51,8 +51,6 @@ return 0; } - // TODO: To be deprecated when FastTLABRefill is deprecated. - update_end_pointers(); return pointer_delta(reserved_end(), top()); } @@ -125,8 +123,6 @@ myThread()->incr_allocated_bytes(used_bytes()); } - // TODO: To be deprecated when FastTLABRefill is deprecated. - update_end_pointers(); CollectedHeap::fill_with_object(top(), reserved_end(), retire && zap); if (retire || ZeroTLAB) { // "Reset" the TLAB @@ -135,12 +131,11 @@ set_pf_top(NULL); set_current_end(NULL); set_allocation_end(NULL); - set_last_slow_path_end(NULL); } } assert(!(retire || ZeroTLAB) || (start() == NULL && current_end() == NULL && top() == NULL && - _allocation_end == NULL && _last_slow_path_end == NULL), + _allocation_end == NULL), "TLAB must be reset"); } @@ -205,7 +200,6 @@ set_pf_top(top); set_current_end(end); set_allocation_end(end); - set_last_slow_path_end(end); invariants(); } @@ -336,7 +330,6 @@ if (heap_words_remaining > words_until_sample) { HeapWord* new_end = _top + words_until_sample; set_current_end(new_end); - set_last_slow_path_end(new_end); _bytes_since_last_sample_point = bytes_until_sample; } else { _bytes_since_last_sample_point = heap_words_remaining * HeapWordSize;; @@ -350,20 +343,9 @@ } void ThreadLocalAllocBuffer::set_back_allocation_end() { - update_end_pointers(); _current_end = _allocation_end; } -void ThreadLocalAllocBuffer::update_end_pointers() { - // Did a fast TLAB refill occur? (This will be deprecated when fast TLAB - // refill disappears). - if (_last_slow_path_end != _current_end) { - // Fix up the last slow path end to be now the end of this TLAB. - _last_slow_path_end = _current_end; - _allocation_end = _current_end; - } -} - HeapWord* ThreadLocalAllocBuffer::allocate_sampled_object(size_t size) { Thread* thread = myThread(); thread->tlab().set_back_allocation_end(); @@ -378,8 +360,6 @@ } HeapWord* ThreadLocalAllocBuffer::reserved_end() { - assert (_last_slow_path_end == _current_end, - "Have to call update_end_pointers before reserved_end."); return _allocation_end + alignment_reserve(); }