8230096: ZGC: Remove unused ZObjectAllocator::_nworkers
authorpliden
Wed, 28 Aug 2019 09:50:23 +0200
changeset 57901 53ed0cf870b0
parent 57900 0cd210d5cb9c
child 57903 5e2576c303a2
8230096: ZGC: Remove unused ZObjectAllocator::_nworkers Reviewed-by: stefank
src/hotspot/share/gc/z/zHeap.cpp
src/hotspot/share/gc/z/zObjectAllocator.cpp
src/hotspot/share/gc/z/zObjectAllocator.hpp
--- a/src/hotspot/share/gc/z/zHeap.cpp	Wed Aug 28 09:50:21 2019 +0200
+++ b/src/hotspot/share/gc/z/zHeap.cpp	Wed Aug 28 09:50:23 2019 +0200
@@ -64,7 +64,7 @@
 
 ZHeap::ZHeap() :
     _workers(),
-    _object_allocator(_workers.nworkers()),
+    _object_allocator(),
     _page_allocator(heap_min_size(), heap_initial_size(), heap_max_size(), heap_max_reserve_size()),
     _page_table(),
     _forwarding_table(),
--- a/src/hotspot/share/gc/z/zObjectAllocator.cpp	Wed Aug 28 09:50:21 2019 +0200
+++ b/src/hotspot/share/gc/z/zObjectAllocator.cpp	Wed Aug 28 09:50:23 2019 +0200
@@ -41,8 +41,7 @@
 static const ZStatCounter ZCounterUndoObjectAllocationSucceeded("Memory", "Undo Object Allocation Succeeded", ZStatUnitOpsPerSecond);
 static const ZStatCounter ZCounterUndoObjectAllocationFailed("Memory", "Undo Object Allocation Failed", ZStatUnitOpsPerSecond);
 
-ZObjectAllocator::ZObjectAllocator(uint nworkers) :
-    _nworkers(nworkers),
+ZObjectAllocator::ZObjectAllocator() :
     _used(0),
     _undone(0),
     _shared_medium_page(NULL),
--- a/src/hotspot/share/gc/z/zObjectAllocator.hpp	Wed Aug 28 09:50:21 2019 +0200
+++ b/src/hotspot/share/gc/z/zObjectAllocator.hpp	Wed Aug 28 09:50:23 2019 +0200
@@ -31,7 +31,6 @@
 
 class ZObjectAllocator {
 private:
-  const uint         _nworkers;
   ZPerCPU<size_t>    _used;
   ZPerCPU<size_t>    _undone;
   ZContended<ZPage*> _shared_medium_page;
@@ -64,7 +63,7 @@
   bool undo_alloc_object(ZPage* page, uintptr_t addr, size_t size);
 
 public:
-  ZObjectAllocator(uint nworkers);
+  ZObjectAllocator();
 
   uintptr_t alloc_object(size_t size);