src/hotspot/share/gc/parallel/psParallelCompact.cpp
changeset 57662 f81dbe27a7b1
parent 55740 b3ff56f955c8
child 57767 b3e44e1b135d
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Tue Aug 06 11:40:23 2019 -0400
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Tue Aug 06 15:03:48 2019 -0400
@@ -1779,7 +1779,7 @@
   // miscellaneous bookkeeping.
   pre_compact();
 
-  const PreGCValues pre_gc_values(heap);
+  const PreGenGCValues pre_gc_values = heap->get_pre_gc_values();
 
   // Get the compaction manager reserved for the VM thread.
   ParCompactionManager* const vmthread_cm =
@@ -1923,9 +1923,7 @@
       accumulated_time()->stop();
     }
 
-    young_gen->print_used_change(pre_gc_values.young_gen_used());
-    old_gen->print_used_change(pre_gc_values.old_gen_used());
-    MetaspaceUtils::print_metaspace_change(pre_gc_values.metaspace_sizes());
+    heap->print_heap_change(pre_gc_values);
 
     // Track memory usage and detect low memory
     MemoryService::track_memory_usage();