--- old/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp 2015-04-07 20:38:40.697789039 +0400 +++ new/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp 2015-04-07 20:38:40.605789046 +0400 @@ -45,6 +45,7 @@ // In support of ergonomic sizing of PLAB's size_t _allocated; // in HeapWord units size_t _wasted; // in HeapWord units + size_t _undo_wasted; char tail[32]; static size_t AlignmentReserve; @@ -97,11 +98,18 @@ assert(pointer_delta(_top, obj) == word_sz, "Bad undo"); _top = obj; } + + void add_undo_waste(size_t word_sz) { + _undo_wasted += word_sz; + } // The total (word) size of the buffer, including both allocated and // unallocated space. size_t word_sz() { return _word_sz; } + size_t wasted() { return _wasted; } + size_t undo_wasted() { return _undo_wasted; } + // Should only be done if we are about to reset with a new buffer of the // given size. void set_word_size(size_t new_word_sz) {