src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp

Print this page
rev 4613 : 8010738: G1: Output for full GCs with +PrintGCDetails should contain perm gen size/meta data change info
Summary: Include metaspace information (used, allocated, reserved) in the PrintGCDetails output for full GCs.
Reviewed-by:

@@ -173,11 +173,10 @@
   }
 
   CollectionSetChooser* _collectionSetChooser;
 
   double _full_collection_start_sec;
-  size_t _cur_collection_pause_used_at_start_bytes;
   uint   _cur_collection_pause_used_regions_at_start;
 
   // These exclude marking times.
   TruncatedSeq* _recent_gc_times_ms;
 

@@ -192,11 +191,10 @@
   // indicates whether we are in young or mixed GC mode
   bool _gcs_are_young;
 
   uint _young_list_target_length;
   uint _young_list_fixed_length;
-  size_t _prev_eden_capacity; // used for logging
 
   // The max number of regions we can extend the eden by while the GC
   // locker is active. This should be >= _young_list_target_length;
   uint _young_list_max_length;
 

@@ -691,15 +689,15 @@
   void record_concurrent_mark_cleanup_end(int no_of_gc_threads);
   void record_concurrent_mark_cleanup_completed();
 
   // Records the information about the heap size for reporting in
   // print_detailed_heap_transition
-  void record_heap_size_info_at_start();
+  void record_heap_size_info_at_start(bool full);
 
   // Print heap sizing transition (with less and more detail).
   void print_heap_transition();
-  void print_detailed_heap_transition();
+  void print_detailed_heap_transition(bool full = false);
 
   void record_stop_world_start();
   void record_concurrent_pause();
 
   // Record how much space we copied during a GC. This is typically

@@ -859,13 +857,20 @@
 
   // The limit on the number of regions allocated for survivors.
   uint _max_survivor_regions;
 
   // For reporting purposes.
-  size_t _eden_bytes_before_gc;
-  size_t _survivor_bytes_before_gc;
-  size_t _capacity_before_gc;
+  // The value of _heap_bytes_before_gc is also used to calculate
+  // the cost of copying.
+
+  size_t _eden_bytes_before_gc;         // Eden occupancy before GC
+  size_t _survivor_bytes_before_gc;     // Survivor occupancy before GC
+  size_t _heap_bytes_before_gc;         // Heap occupancy before GC
+  size_t _meta_bytes_before_gc;         // Metaspace occupancy before GC
+
+  size_t _eden_capacity_before_gc;      // Eden capacity before GC
+  size_t _heap_capacity_before_gc;      // Heap capacity before GC
 
   // The amount of survivor regions after a collection.
   uint _recorded_survivor_regions;
   // List of survivor regions.
   HeapRegion* _recorded_survivor_head;