--- old/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp 2017-10-31 13:44:22.759661948 -0700 +++ new/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp 2017-10-31 13:44:22.403663369 -0700 @@ -93,6 +93,10 @@ size_t remaining() { return end() == NULL ? 0 : pointer_delta(hard_end(), top()); } + // Obtain the actual end of the TLAB. + HeapWord* hard_end(); + void set_sample_end(); + // Make parsable and release it. void reset(); @@ -130,9 +134,6 @@ HeapWord* start() const { return _start; } HeapWord* end() const { return _end; } - HeapWord* slow_path_end() const { return _slow_path_end; } - HeapWord* actual_end() const { return _actual_end; } - HeapWord* hard_end(); HeapWord* top() const { return _top; } HeapWord* pf_top() const { return _pf_top; } size_t desired_size() const { return _desired_size; } @@ -180,19 +181,15 @@ void initialize(); void pick_next_sample(size_t diff = 0); - void set_sample_end(); void set_back_actual_end(); void handle_sample(Thread* thread, HeapWord* result, size_t size); - size_t bytes_until_sample() { return _bytes_until_sample; } - size_t *bytes_until_sample_addr() { return &_bytes_until_sample; } - bool should_sample() { return bytes_until_sample() == 0; } + bool should_sample() { return _bytes_until_sample == 0; } static size_t refill_waste_limit_increment() { return TLABWasteIncrement; } // Code generation support static ByteSize start_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _start); } static ByteSize end_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _end ); } - static ByteSize actual_end_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _actual_end ); } static ByteSize top_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _top ); } static ByteSize pf_top_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _pf_top ); } static ByteSize size_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _desired_size ); }