8144992: Remove OopIterateClosure::idempotent
authorstefank
Tue, 26 Jun 2018 13:55:17 +0200
changeset 50801 94b56c8594ef
parent 50800 6da12aa23b88
child 50802 fa380b3b2b7d
8144992: Remove OopIterateClosure::idempotent Reviewed-by: pliden, kbarrett
src/hotspot/share/gc/shared/space.cpp
src/hotspot/share/memory/iterator.hpp
--- a/src/hotspot/share/gc/shared/space.cpp	Tue Jun 26 13:54:19 2018 +0200
+++ b/src/hotspot/share/gc/shared/space.cpp	Tue Jun 26 13:55:17 2018 +0200
@@ -133,8 +133,7 @@
          "Only ones we deal with for now.");
 
   assert(_precision != CardTable::ObjHeadPreciseArray ||
-         _cl->idempotent() || _last_bottom == NULL ||
-         top <= _last_bottom,
+         _last_bottom == NULL || top <= _last_bottom,
          "Not decreasing");
   NOT_PRODUCT(_last_bottom = mr.start());
 
@@ -172,14 +171,7 @@
     walk_mem_region(extended_mr, bottom_obj, top);
   }
 
-  // An idempotent closure might be applied in any order, so we don't
-  // record a _min_done for it.
-  if (!_cl->idempotent()) {
-    _min_done = bottom;
-  } else {
-    assert(_min_done == _last_explicit_min_done,
-           "Don't update _min_done for idempotent cl");
-  }
+  _min_done = bottom;
 }
 
 DirtyCardToOopClosure* Space::new_dcto_cl(OopIterateClosure* cl,
--- a/src/hotspot/share/memory/iterator.hpp	Tue Jun 26 13:54:19 2018 +0200
+++ b/src/hotspot/share/memory/iterator.hpp	Tue Jun 26 13:55:17 2018 +0200
@@ -94,10 +94,6 @@
   virtual void do_klass(Klass* k) = 0;
   virtual void do_cld(ClassLoaderData* cld) = 0;
 
-  // True iff this closure may be safely applied more than once to an oop
-  // location without an intervening "major reset" (like the end of a GC).
-  virtual bool idempotent() { return false; }
-
 #ifdef ASSERT
   // Default verification of each visited oop field.
   template <typename T> void verify(T* p);