< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahMonitoringSupport.cpp

Print this page

        

@@ -44,16 +44,16 @@
 class ShenandoahGenerationCounters : public GenerationCounters {
 private:
   ShenandoahHeap* _heap;
 public:
   ShenandoahGenerationCounters(ShenandoahHeap* heap) :
-          GenerationCounters("Heap", 1, 1, heap->initial_capacity(), heap->max_capacity(), heap->capacity()),
+          GenerationCounters("Heap", 1, 1, heap->initial_capacity(), heap->max_capacity(), heap->committed()),
           _heap(heap)
   {};
 
   virtual void update_all() {
-    _current_size->set_value(_heap->capacity());
+    _current_size->set_value(_heap->committed());
   }
 };
 
 ShenandoahMonitoringSupport::ShenandoahMonitoringSupport(ShenandoahHeap* heap) :
         _partial_counters(NULL),

@@ -92,11 +92,11 @@
   MemoryService::track_memory_usage();
 
   if (UsePerfData) {
     ShenandoahHeap* heap = ShenandoahHeap::heap();
     size_t used = heap->used();
-    size_t capacity = heap->max_capacity();
+    size_t capacity = heap->capacity();
     _heap_counters->update_all();
     _space_counters->update_all(capacity, used);
     _heap_region_counters->update();
 
     MetaspaceCounters::update_performance_counters();
< prev index next >