# HG changeset patch # User sjohanss # Date 1429100725 -7200 # Wed Apr 15 14:25:25 2015 +0200 # Node ID 331689415b3542e1612f9e485ed91fa69fb3b0f0 # Parent 6e07b309953b25cc0ac2d9246b0cd992feb38e1c 8077836: Make sure G1ParGCAllocBuffer are marked as retired Reviewed-by: diff --git a/src/share/vm/gc_implementation/g1/g1Allocator.hpp b/src/share/vm/gc_implementation/g1/g1Allocator.hpp --- a/src/share/vm/gc_implementation/g1/g1Allocator.hpp +++ b/src/share/vm/gc_implementation/g1/g1Allocator.hpp @@ -169,6 +169,11 @@ ParGCAllocBuffer::retire(); _retired = true; } + + virtual void flush_and_retire_stats(PLABStats* stats) { + ParGCAllocBuffer::flush_and_retire_stats(stats); + _retired = true; + } }; class G1ParGCAllocator : public CHeapObj { @@ -211,6 +216,7 @@ _g1h(g1h), _survivor_alignment_bytes(calc_survivor_alignment_bytes()), _alloc_buffer_waste(0), _undo_waste(0) { } + virtual ~G1ParGCAllocator() { } static G1ParGCAllocator* create_allocator(G1CollectedHeap* g1h); diff --git a/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp b/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp --- a/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp +++ b/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp @@ -133,7 +133,7 @@ // Flush allocation statistics into the given PLABStats supporting ergonomic // sizing of PLAB's and retire the current buffer. To be called at the end of // GC. - void flush_and_retire_stats(PLABStats* stats); + virtual void flush_and_retire_stats(PLABStats* stats); // Fills in the unallocated portion of the buffer with a garbage object and updates // statistics. To be called during GC.