Fixup serviceability for Epsilon. epsilon-gc-branch
authorshade
Thu, 07 Dec 2017 13:19:22 +0100
branchepsilon-gc-branch
changeset 55975 26d15be1c920
parent 55974 06122633fead
child 55976 be6a0c9587da
Fixup serviceability for Epsilon.
src/hotspot/share/gc/epsilon/epsilonHeap.cpp
src/hotspot/share/gc/epsilon/epsilonHeap.hpp
--- a/src/hotspot/share/gc/epsilon/epsilonHeap.cpp	Thu Dec 07 13:05:31 2017 +0100
+++ b/src/hotspot/share/gc/epsilon/epsilonHeap.cpp	Thu Dec 07 13:19:22 2017 +0100
@@ -73,32 +73,19 @@
 }
 
 void EpsilonHeap::initialize_serviceability() {
-//  _minor_gc_manager = MemoryManager::get_epsilon_memory_manager();
-//  _major_gc_manager = MemoryManager::get_epsilon_memory_manager();
-//  _managers_list->append(_minor_gc_manager);
-//  _managers_list->append(_major_gc_manager);
-//  EpsilonDummyMemoryPool* dummy = new EpsilonDummyMemoryPool();
-//
-//  _minor_gc_manager->add_pool(dummy);
-//  _pools_list->append(dummy);
-//
-//  EpsilonMemoryPool* pool = new EpsilonMemoryPool(this);
-//  _major_gc_manager->add_pool(pool);
-//  _pools_list->append(pool);
+  _pool = new EpsilonMemoryPool(this);
+  _memory_manager.add_pool(_pool);
 }
 
 GrowableArray<GCMemoryManager*> EpsilonHeap::memory_managers() {
-  GrowableArray<GCMemoryManager*> memory_managers(2);
-//  memory_managers.append(&_memory_manager);
-//  memory_managers.append(&_full_gc_memory_manager);
+  GrowableArray<GCMemoryManager*> memory_managers(1);
+  memory_managers.append(&_memory_manager);
   return memory_managers;
 }
 
 GrowableArray<MemoryPool*> EpsilonHeap::memory_pools() {
   GrowableArray<MemoryPool*> memory_pools(3);
-//  memory_pools.append(_eden_pool);
-//  memory_pools.append(_survivor_pool);
-//  memory_pools.append(_old_pool);
+  memory_pools.append(_pool);
   return memory_pools;
 }
 
--- a/src/hotspot/share/gc/epsilon/epsilonHeap.hpp	Thu Dec 07 13:05:31 2017 +0100
+++ b/src/hotspot/share/gc/epsilon/epsilonHeap.hpp	Thu Dec 07 13:19:22 2017 +0100
@@ -26,6 +26,7 @@
 
 #include "gc/shared/collectedHeap.hpp"
 #include "gc/shared/space.hpp"
+#include "services/memoryManager.hpp"
 #include "gc/epsilon/epsilonCollectorPolicy.hpp"
 #include "gc/epsilon/epsilonMonitoringSupport.hpp"
 #include "gc/epsilon/epsilonBarrierSet.hpp"
@@ -35,12 +36,16 @@
 private:
   EpsilonCollectorPolicy* _policy;
   EpsilonMonitoringSupport* _monitoring_support;
+  MemoryPool* _pool;
+  GCMemoryManager _memory_manager;
   ContiguousSpace* _space;
   VirtualSpace _virtual_space;
   size_t _max_tlab_size;
   size_t _last_counter_update;
 public:
-  EpsilonHeap(EpsilonCollectorPolicy* p) : _policy(p) {};
+  EpsilonHeap(EpsilonCollectorPolicy* p) :
+          _policy(p),
+          _memory_manager("Epsilon Heap", "") {};
 
   virtual Name kind() const {
     return CollectedHeap::EpsilonHeap;