--- old/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp 2018-04-11 14:33:09.405206821 -0700 +++ new/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp 2018-04-11 14:33:09.069207970 -0700 @@ -47,11 +47,11 @@ } size_t ThreadLocalAllocBuffer::remaining() { - if (current_end() == NULL) { + if (fast_path_end() == NULL) { return 0; } - return pointer_delta(reserved_end(), top()); + return pointer_delta(hard_end(), top()); } void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() { @@ -116,25 +116,25 @@ // Waste accounting should be done in caller as appropriate; see, // for example, clear_before_allocation(). void ThreadLocalAllocBuffer::make_parsable(bool retire, bool zap) { - if (current_end() != NULL) { + if (fast_path_end() != NULL) { invariants(); if (retire) { myThread()->incr_allocated_bytes(used_bytes()); } - CollectedHeap::fill_with_object(top(), reserved_end(), retire && zap); + CollectedHeap::fill_with_object(top(), hard_end(), retire && zap); if (retire || ZeroTLAB) { // "Reset" the TLAB set_start(NULL); set_top(NULL); set_pf_top(NULL); - set_current_end(NULL); + set_fast_path_end(NULL); set_allocation_end(NULL); } } assert(!(retire || ZeroTLAB) || - (start() == NULL && current_end() == NULL && top() == NULL && + (start() == NULL && fast_path_end() == NULL && top() == NULL && _allocation_end == NULL), "TLAB must be reset"); } @@ -198,7 +198,7 @@ set_start(start); set_top(top); set_pf_top(top); - set_current_end(end); + set_fast_path_end(end); set_allocation_end(end); invariants(); } @@ -323,13 +323,13 @@ } void ThreadLocalAllocBuffer::set_sample_end() { - size_t heap_words_remaining = pointer_delta(_current_end, _top); + size_t heap_words_remaining = pointer_delta(_fast_path_end, _top); size_t bytes_until_sample = myThread()->heap_sampler().bytes_until_sample(); size_t words_until_sample = bytes_until_sample / HeapWordSize;; if (heap_words_remaining > words_until_sample) { HeapWord* new_end = _top + words_until_sample; - set_current_end(new_end); + set_fast_path_end(new_end); _bytes_since_last_sample_point = bytes_until_sample; } else { _bytes_since_last_sample_point = heap_words_remaining * HeapWordSize;; @@ -343,7 +343,7 @@ } void ThreadLocalAllocBuffer::set_back_allocation_end() { - _current_end = _allocation_end; + _fast_path_end = _allocation_end; } HeapWord* ThreadLocalAllocBuffer::allocate_sampled_object(size_t size) { @@ -359,7 +359,7 @@ return result; } -HeapWord* ThreadLocalAllocBuffer::reserved_end() { +HeapWord* ThreadLocalAllocBuffer::hard_end() { return _allocation_end + alignment_reserve(); }