src/hotspot/share/gc/z/zObjectAllocator.cpp
changeset 51818 75e4ce0fa1ba
parent 51801 09e8e51c948a
child 53072 82d3f0820d37
--- a/src/hotspot/share/gc/z/zObjectAllocator.cpp	Thu Sep 20 14:04:43 2018 +0200
+++ b/src/hotspot/share/gc/z/zObjectAllocator.cpp	Thu Sep 20 14:04:44 2018 +0200
@@ -22,7 +22,6 @@
  */
 
 #include "precompiled.hpp"
-#include "gc/shared/threadLocalAllocBuffer.inline.hpp"
 #include "gc/z/zCollectedHeap.hpp"
 #include "gc/z/zGlobals.hpp"
 #include "gc/z/zHeap.inline.hpp"
@@ -41,8 +40,6 @@
 
 static const ZStatCounter ZCounterUndoObjectAllocationSucceeded("Memory", "Undo Object Allocation Succeeded", ZStatUnitOpsPerSecond);
 static const ZStatCounter ZCounterUndoObjectAllocationFailed("Memory", "Undo Object Allocation Failed", ZStatUnitOpsPerSecond);
-static const ZStatSubPhase ZSubPhasePauseRetireTLABS("Pause Retire TLABS");
-static const ZStatSubPhase ZSubPhasePauseRemapTLABS("Pause Remap TLABS");
 
 ZObjectAllocator::ZObjectAllocator(uint nworkers) :
     _nworkers(nworkers),
@@ -293,17 +290,9 @@
   return 0;
 }
 
-void ZObjectAllocator::retire_tlabs() {
-  ZStatTimer timer(ZSubPhasePauseRetireTLABS);
+void ZObjectAllocator::retire_pages() {
   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
 
-  // Retire TLABs
-  if (UseTLAB) {
-    ZCollectedHeap* heap = ZCollectedHeap::heap();
-    heap->ensure_parsability(true /* retire_tlabs */);
-    heap->resize_all_tlabs();
-  }
-
   // Reset used
   _used.set_all(0);
 
@@ -312,18 +301,3 @@
   _shared_small_page.set_all(NULL);
   _worker_small_page.set_all(NULL);
 }
-
-static void remap_tlab_address(HeapWord** p) {
-  *p = (HeapWord*)ZAddress::good_or_null((uintptr_t)*p);
-}
-
-void ZObjectAllocator::remap_tlabs() {
-  ZStatTimer timer(ZSubPhasePauseRemapTLABS);
-  assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
-
-  if (UseTLAB) {
-    for (JavaThreadIteratorWithHandle iter; JavaThread* thread = iter.next(); ) {
-      thread->tlab().addresses_do(remap_tlab_address);
-    }
-  }
-}