8077836: Make sure G1ParGCAllocBuffer are marked as retired
authorsjohanss
Wed, 22 Apr 2015 12:58:10 +0200
changeset 30278 928bec4e217f
parent 30277 2ac770e7bc12
child 30279 c3b8486760aa
8077836: Make sure G1ParGCAllocBuffer are marked as retired Reviewed-by: tschatzl, pliden
hotspot/src/share/vm/gc_implementation/g1/g1Allocator.hpp
hotspot/src/share/vm/gc_implementation/shared/plab.hpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1Allocator.hpp	Wed Apr 22 09:39:38 2015 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1Allocator.hpp	Wed Apr 22 12:58:10 2015 +0200
@@ -169,6 +169,11 @@
     PLAB::retire();
     _retired = true;
   }
+
+  virtual void flush_and_retire_stats(PLABStats* stats) {
+    PLAB::flush_and_retire_stats(stats);
+    _retired = true;
+  }
 };
 
 class G1ParGCAllocator : public CHeapObj<mtGC> {
@@ -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);
 
--- a/hotspot/src/share/vm/gc_implementation/shared/plab.hpp	Wed Apr 22 09:39:38 2015 +0200
+++ b/hotspot/src/share/vm/gc_implementation/shared/plab.hpp	Wed Apr 22 12:58:10 2015 +0200
@@ -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.