8217374: Rename G1 EvacuationInfo class to G1EvacuationInfo
authortschatzl
Mon, 21 Jan 2019 12:19:00 +0100
changeset 53411 aa87f38fcba2
parent 53410 571f12d51db5
child 53412 6e993d9ae8a7
8217374: Rename G1 EvacuationInfo class to G1EvacuationInfo Reviewed-by: phh, kbarrett
src/hotspot/share/gc/g1/evacuationInfo.hpp
src/hotspot/share/gc/g1/g1Allocator.cpp
src/hotspot/share/gc/g1/g1Allocator.hpp
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
src/hotspot/share/gc/g1/g1CollectedHeap.hpp
src/hotspot/share/gc/g1/g1EvacuationInfo.hpp
src/hotspot/share/gc/shared/gcTrace.cpp
src/hotspot/share/gc/shared/gcTrace.hpp
src/hotspot/share/gc/shared/gcTraceSend.cpp
--- a/src/hotspot/share/gc/g1/evacuationInfo.hpp	Mon Jan 21 10:05:24 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_GC_G1_EVACUATIONINFO_HPP
-#define SHARE_GC_G1_EVACUATIONINFO_HPP
-
-#include "memory/allocation.hpp"
-
-class EvacuationInfo : public StackObj {
-  uint _collectionset_regions;
-  uint _allocation_regions;
-  size_t _collectionset_used_before;
-  size_t _collectionset_used_after;
-  size_t _alloc_regions_used_before;
-  size_t _bytes_copied;
-  uint   _regions_freed;
-
-public:
-  EvacuationInfo() : _collectionset_regions(0), _allocation_regions(0), _collectionset_used_before(0),
-                     _collectionset_used_after(0), _alloc_regions_used_before(0),
-                     _bytes_copied(0), _regions_freed(0) { }
-
-  void set_collectionset_regions(uint collectionset_regions) {
-    _collectionset_regions = collectionset_regions;
-  }
-
-  void set_allocation_regions(uint allocation_regions) {
-    _allocation_regions = allocation_regions;
-  }
-
-  void set_collectionset_used_before(size_t used) {
-    _collectionset_used_before = used;
-  }
-
-  void increment_collectionset_used_after(size_t used) {
-    _collectionset_used_after += used;
-  }
-
-  void set_alloc_regions_used_before(size_t used) {
-    _alloc_regions_used_before = used;
-  }
-
-  void set_bytes_copied(size_t copied) {
-    _bytes_copied = copied;
-  }
-
-  void set_regions_freed(uint freed) {
-    _regions_freed += freed;
-  }
-
-  uint   collectionset_regions()     { return _collectionset_regions; }
-  uint   allocation_regions()        { return _allocation_regions; }
-  size_t collectionset_used_before() { return _collectionset_used_before; }
-  size_t collectionset_used_after()  { return _collectionset_used_after; }
-  size_t alloc_regions_used_before() { return _alloc_regions_used_before; }
-  size_t bytes_copied()              { return _bytes_copied; }
-  uint   regions_freed()             { return _regions_freed; }
-};
-
-#endif // SHARE_GC_G1_EVACUATIONINFO_HPP
--- a/src/hotspot/share/gc/g1/g1Allocator.cpp	Mon Jan 21 10:05:24 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1Allocator.cpp	Mon Jan 21 12:19:00 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 #include "gc/g1/g1Allocator.inline.hpp"
 #include "gc/g1/g1AllocRegion.inline.hpp"
 #include "gc/g1/g1EvacStats.inline.hpp"
+#include "gc/g1/g1EvacuationInfo.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/g1/g1Policy.hpp"
 #include "gc/g1/heapRegion.inline.hpp"
@@ -57,7 +58,7 @@
   return _retained_old_gc_alloc_region == hr;
 }
 
-void G1Allocator::reuse_retained_old_region(EvacuationInfo& evacuation_info,
+void G1Allocator::reuse_retained_old_region(G1EvacuationInfo& evacuation_info,
                                             OldGCAllocRegion* old,
                                             HeapRegion** retained_old) {
   HeapRegion* retained_region = *retained_old;
@@ -90,7 +91,7 @@
   }
 }
 
-void G1Allocator::init_gc_alloc_regions(EvacuationInfo& evacuation_info) {
+void G1Allocator::init_gc_alloc_regions(G1EvacuationInfo& evacuation_info) {
   assert_at_safepoint_on_vm_thread();
 
   _survivor_is_full = false;
@@ -103,7 +104,7 @@
                             &_retained_old_gc_alloc_region);
 }
 
-void G1Allocator::release_gc_alloc_regions(EvacuationInfo& evacuation_info) {
+void G1Allocator::release_gc_alloc_regions(G1EvacuationInfo& evacuation_info) {
   evacuation_info.set_allocation_regions(survivor_gc_alloc_region()->count() +
                                          old_gc_alloc_region()->count());
   survivor_gc_alloc_region()->release();
--- a/src/hotspot/share/gc/g1/g1Allocator.hpp	Mon Jan 21 10:05:24 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1Allocator.hpp	Mon Jan 21 12:19:00 2019 +0100
@@ -30,7 +30,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "gc/shared/plab.hpp"
 
-class EvacuationInfo;
+class G1EvacuationInfo;
 
 // Interface to keep track of which regions G1 is currently allocating into. Provides
 // some accessors (e.g. allocating into them, or getting their occupancy).
@@ -63,7 +63,7 @@
   void set_survivor_full();
   void set_old_full();
 
-  void reuse_retained_old_region(EvacuationInfo& evacuation_info,
+  void reuse_retained_old_region(G1EvacuationInfo& evacuation_info,
                                  OldGCAllocRegion* old,
                                  HeapRegion** retained);
 
@@ -92,8 +92,8 @@
   void init_mutator_alloc_region();
   void release_mutator_alloc_region();
 
-  void init_gc_alloc_regions(EvacuationInfo& evacuation_info);
-  void release_gc_alloc_regions(EvacuationInfo& evacuation_info);
+  void init_gc_alloc_regions(G1EvacuationInfo& evacuation_info);
+  void release_gc_alloc_regions(G1EvacuationInfo& evacuation_info);
   void abandon_gc_alloc_regions();
   bool is_retained_old_region(HeapRegion* hr);
 
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Jan 21 10:05:24 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Jan 21 12:19:00 2019 +0100
@@ -2918,7 +2918,7 @@
 
   // Inner scope for scope based logging, timers, and stats collection
   {
-    EvacuationInfo evacuation_info;
+    G1EvacuationInfo evacuation_info;
 
     if (collector_state()->in_initial_mark_gc()) {
       // We are about to start a marking cycle, so we increment the
@@ -3899,7 +3899,7 @@
   phase_times->record_optional_evacuation((os::elapsedTime() - start_time_sec) * 1000.0);
 }
 
-void G1CollectedHeap::post_evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states) {
+void G1CollectedHeap::post_evacuate_collection_set(G1EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states) {
   // Also cleans the card table from temporary duplicate detection information used
   // during UpdateRS/ScanRS.
   g1_rem_set()->cleanup_after_oops_into_collection_set_do();
@@ -4033,7 +4033,7 @@
   // be done serially in a single thread.
   class G1SerialFreeCollectionSetClosure : public HeapRegionClosure {
   private:
-    EvacuationInfo* _evacuation_info;
+    G1EvacuationInfo* _evacuation_info;
     const size_t* _surviving_young_words;
 
     // Bytes used in successfully evacuated regions before the evacuation.
@@ -4048,7 +4048,7 @@
 
     FreeRegionList _local_free_list;
   public:
-    G1SerialFreeCollectionSetClosure(EvacuationInfo* evacuation_info, const size_t* surviving_young_words) :
+    G1SerialFreeCollectionSetClosure(G1EvacuationInfo* evacuation_info, const size_t* surviving_young_words) :
       HeapRegionClosure(),
       _evacuation_info(evacuation_info),
       _surviving_young_words(surviving_young_words),
@@ -4202,7 +4202,7 @@
     policy->cset_regions_freed();
   }
 public:
-  G1FreeCollectionSetTask(G1CollectionSet* collection_set, EvacuationInfo* evacuation_info, const size_t* surviving_young_words) :
+  G1FreeCollectionSetTask(G1CollectionSet* collection_set, G1EvacuationInfo* evacuation_info, const size_t* surviving_young_words) :
     AbstractGangTask("G1 Free Collection Set"),
     _collection_set(collection_set),
     _cl(evacuation_info, surviving_young_words),
@@ -4285,7 +4285,7 @@
   }
 };
 
-void G1CollectedHeap::free_collection_set(G1CollectionSet* collection_set, EvacuationInfo& evacuation_info, const size_t* surviving_young_words) {
+void G1CollectedHeap::free_collection_set(G1CollectionSet* collection_set, G1EvacuationInfo& evacuation_info, const size_t* surviving_young_words) {
   _eden.clear();
 
   double free_cset_start_time = os::elapsedTime();
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Mon Jan 21 10:05:24 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Mon Jan 21 12:19:00 2019 +0100
@@ -25,7 +25,6 @@
 #ifndef SHARE_GC_G1_G1COLLECTEDHEAP_HPP
 #define SHARE_GC_G1_G1COLLECTEDHEAP_HPP
 
-#include "gc/g1/evacuationInfo.hpp"
 #include "gc/g1/g1BarrierSet.hpp"
 #include "gc/g1/g1BiasedArray.hpp"
 #include "gc/g1/g1CardTable.hpp"
@@ -35,6 +34,7 @@
 #include "gc/g1/g1EdenRegions.hpp"
 #include "gc/g1/g1EvacFailure.hpp"
 #include "gc/g1/g1EvacStats.hpp"
+#include "gc/g1/g1EvacuationInfo.hpp"
 #include "gc/g1/g1GCPhaseTimes.hpp"
 #include "gc/g1/g1HeapTransition.hpp"
 #include "gc/g1/g1HeapVerifier.hpp"
@@ -735,7 +735,7 @@
   void evacuate_optional_regions(G1ParScanThreadStateSet* per_thread_states, G1OptionalCSet* ocset);
 
   void pre_evacuate_collection_set();
-  void post_evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* pss);
+  void post_evacuate_collection_set(G1EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* pss);
 
   // Print the header for the per-thread termination statistics.
   static void print_termination_stats_hdr();
@@ -762,7 +762,7 @@
 
   // After a collection pause, convert the regions in the collection set into free
   // regions.
-  void free_collection_set(G1CollectionSet* collection_set, EvacuationInfo& evacuation_info, const size_t* surviving_young_words);
+  void free_collection_set(G1CollectionSet* collection_set, G1EvacuationInfo& evacuation_info, const size_t* surviving_young_words);
 
   // Abandon the current collection set without recording policy
   // statistics or updating free lists.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/gc/g1/g1EvacuationInfo.hpp	Mon Jan 21 12:19:00 2019 +0100
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_GC_G1_G1EVACUATIONINFO_HPP
+#define SHARE_GC_G1_G1EVACUATIONINFO_HPP
+
+#include "memory/allocation.hpp"
+
+class G1EvacuationInfo : public StackObj {
+  uint _collectionset_regions;
+  uint _allocation_regions;
+  size_t _collectionset_used_before;
+  size_t _collectionset_used_after;
+  size_t _alloc_regions_used_before;
+  size_t _bytes_copied;
+  uint   _regions_freed;
+
+public:
+  G1EvacuationInfo() : _collectionset_regions(0), _allocation_regions(0), _collectionset_used_before(0),
+                     _collectionset_used_after(0), _alloc_regions_used_before(0),
+                     _bytes_copied(0), _regions_freed(0) { }
+
+  void set_collectionset_regions(uint collectionset_regions) {
+    _collectionset_regions = collectionset_regions;
+  }
+
+  void set_allocation_regions(uint allocation_regions) {
+    _allocation_regions = allocation_regions;
+  }
+
+  void set_collectionset_used_before(size_t used) {
+    _collectionset_used_before = used;
+  }
+
+  void increment_collectionset_used_after(size_t used) {
+    _collectionset_used_after += used;
+  }
+
+  void set_alloc_regions_used_before(size_t used) {
+    _alloc_regions_used_before = used;
+  }
+
+  void set_bytes_copied(size_t copied) {
+    _bytes_copied = copied;
+  }
+
+  void set_regions_freed(uint freed) {
+    _regions_freed += freed;
+  }
+
+  uint   collectionset_regions()     { return _collectionset_regions; }
+  uint   allocation_regions()        { return _allocation_regions; }
+  size_t collectionset_used_before() { return _collectionset_used_before; }
+  size_t collectionset_used_after()  { return _collectionset_used_after; }
+  size_t alloc_regions_used_before() { return _alloc_regions_used_before; }
+  size_t bytes_copied()              { return _bytes_copied; }
+  uint   regions_freed()             { return _regions_freed; }
+};
+
+#endif // SHARE_GC_G1_G1EVACUATIONINFO_HPP
--- a/src/hotspot/share/gc/shared/gcTrace.cpp	Mon Jan 21 10:05:24 2019 +0100
+++ b/src/hotspot/share/gc/shared/gcTrace.cpp	Mon Jan 21 12:19:00 2019 +0100
@@ -37,7 +37,7 @@
 #include "utilities/macros.hpp"
 #include "utilities/ticks.hpp"
 #if INCLUDE_G1GC
-#include "gc/g1/evacuationInfo.hpp"
+#include "gc/g1/g1EvacuationInfo.hpp"
 #endif
 
 void GCTracer::report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp) {
@@ -200,7 +200,7 @@
   send_g1_young_gc_event();
 }
 
-void G1NewTracer::report_evacuation_info(EvacuationInfo* info) {
+void G1NewTracer::report_evacuation_info(G1EvacuationInfo* info) {
   send_evacuation_info_event(info);
 }
 
--- a/src/hotspot/share/gc/shared/gcTrace.hpp	Mon Jan 21 10:05:24 2019 +0100
+++ b/src/hotspot/share/gc/shared/gcTrace.hpp	Mon Jan 21 12:19:00 2019 +0100
@@ -38,7 +38,7 @@
 #include "gc/g1/g1YCTypes.hpp"
 #endif
 
-class EvacuationInfo;
+class G1EvacuationInfo;
 class GCHeapSummary;
 class MetaspaceChunkFreeListSummary;
 class MetaspaceSummary;
@@ -248,7 +248,7 @@
 
   void report_yc_type(G1YCType type);
   void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
-  void report_evacuation_info(EvacuationInfo* info);
+  void report_evacuation_info(G1EvacuationInfo* info);
   void report_evacuation_failed(EvacuationFailedInfo& ef_info);
 
   void report_evacuation_statistics(const G1EvacSummary& young_summary, const G1EvacSummary& old_summary) const;
@@ -268,7 +268,7 @@
                                        bool prediction_active);
  private:
   void send_g1_young_gc_event();
-  void send_evacuation_info_event(EvacuationInfo* info);
+  void send_evacuation_info_event(G1EvacuationInfo* info);
   void send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const;
 
   void send_young_evacuation_statistics(const G1EvacSummary& summary) const;
--- a/src/hotspot/share/gc/shared/gcTraceSend.cpp	Mon Jan 21 10:05:24 2019 +0100
+++ b/src/hotspot/share/gc/shared/gcTraceSend.cpp	Mon Jan 21 12:19:00 2019 +0100
@@ -32,7 +32,7 @@
 #include "runtime/os.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_G1GC
-#include "gc/g1/evacuationInfo.hpp"
+#include "gc/g1/g1EvacuationInfo.hpp"
 #include "gc/g1/g1YCTypes.hpp"
 #endif
 
@@ -209,7 +209,7 @@
   }
 }
 
-void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) {
+void G1NewTracer::send_evacuation_info_event(G1EvacuationInfo* info) {
   EventEvacuationInformation e;
   if (e.should_commit()) {
     e.set_gcId(GCId::current());