src/hotspot/share/gc/g1/heapRegion.cpp
changeset 47885 5caa1d5f74c1
parent 47216 71c04702a3d5
child 49164 7e958a8ebcd3
--- a/src/hotspot/share/gc/g1/heapRegion.cpp	Mon Oct 30 08:34:54 2017 +0100
+++ b/src/hotspot/share/gc/g1/heapRegion.cpp	Tue Nov 14 11:33:23 2017 +0100
@@ -42,6 +42,7 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/orderAccess.inline.hpp"
+#include "utilities/growableArray.hpp"
 
 int    HeapRegion::LogOfHRGrainBytes = 0;
 int    HeapRegion::LogOfHRGrainWords = 0;
@@ -106,14 +107,6 @@
   }
 }
 
-void HeapRegion::reset_after_compaction() {
-  G1ContiguousSpace::reset_after_compaction();
-  // After a compaction the mark bitmap is invalid, so we must
-  // treat all objects as being inside the unmarked area.
-  zero_marked_bytes();
-  init_top_at_mark_start();
-}
-
 void HeapRegion::hr_clear(bool keep_remset, bool clear_space, bool locked) {
   assert(_humongous_start_region == NULL,
          "we should have already filtered out humongous regions");
@@ -278,10 +271,6 @@
                                             (uint)allocation_context());
 }
 
-CompactibleSpace* HeapRegion::next_compaction_space() const {
-  return G1CollectedHeap::heap()->next_compaction_region(this);
-}
-
 void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark,
                                                     bool during_conc_mark) {
   // We always recreate the prev marking info and we'll explicitly
@@ -411,7 +400,7 @@
     // We're not verifying code roots.
     return;
   }
-  if (vo == VerifyOption_G1UseMarkWord) {
+  if (vo == VerifyOption_G1UseFullMarking) {
     // Marking verification during a full GC is performed after class
     // unloading, code cache unloading, etc so the strong code roots
     // attached to each heap region are in an inconsistent state. They won't
@@ -482,7 +471,7 @@
 public:
   // _vo == UsePrevMarking -> use "prev" marking information,
   // _vo == UseNextMarking -> use "next" marking information,
-  // _vo == UseMarkWord    -> use mark word from object header.
+  // _vo == UseFullMarking -> use "next" marking bitmap but no TAMS.
   G1VerificationClosure(G1CollectedHeap* g1h, VerifyOption vo) :
     _g1h(g1h), _bs(barrier_set_cast<CardTableModRefBS>(g1h->barrier_set())),
     _containing_obj(NULL), _failures(false), _n_failures(0), _vo(vo) {
@@ -833,7 +822,8 @@
 }
 
 void HeapRegion::prepare_for_compaction(CompactPoint* cp) {
-  scan_and_forward(this, cp);
+  // Not used for G1 anymore, but pure virtual in Space.
+  ShouldNotReachHere();
 }
 
 // G1OffsetTableContigSpace code; copied from space.cpp.  Hope this can go