8234438: Remove some CMS leftovers
authorpliden
Wed, 20 Nov 2019 10:37:46 +0100
changeset 59154 0c2e1808f800
parent 59153 1152339c298a
child 59156 14fa9e70ae71
8234438: Remove some CMS leftovers Reviewed-by: kbarrett, sjohanss
src/hotspot/share/gc/shared/space.cpp
src/hotspot/share/gc/shared/space.hpp
src/hotspot/share/gc/shared/space.inline.hpp
src/hotspot/share/memory/freeList.hpp
src/hotspot/share/memory/iterator.hpp
--- a/src/hotspot/share/gc/shared/space.cpp	Wed Nov 20 10:37:46 2019 +0100
+++ b/src/hotspot/share/gc/shared/space.cpp	Wed Nov 20 10:37:46 2019 +0100
@@ -110,18 +110,6 @@
 // we (or another worker thread) may already have scanned
 // or planning to scan.
 void DirtyCardToOopClosure::do_MemRegion(MemRegion mr) {
-
-  // Some collectors need to do special things whenever their dirty
-  // cards are processed. For instance, CMS must remember mutator updates
-  // (i.e. dirty cards) so as to re-scan mutated objects.
-  // Such work can be piggy-backed here on dirty card scanning, so as to make
-  // it slightly more efficient than doing a complete non-destructive pre-scan
-  // of the card table.
-  MemRegionClosure* pCl = _sp->preconsumptionDirtyCardClosure();
-  if (pCl != NULL) {
-    pCl->do_MemRegion(mr);
-  }
-
   HeapWord* bottom = mr.start();
   HeapWord* last = mr.last();
   HeapWord* top = mr.end();
@@ -505,21 +493,6 @@
   }
 }
 
-HeapWord*
-ContiguousSpace::object_iterate_careful(ObjectClosureCareful* blk) {
-  HeapWord * limit = concurrent_iteration_safe_limit();
-  assert(limit <= top(), "sanity check");
-  for (HeapWord* p = bottom(); p < limit;) {
-    size_t size = blk->do_object_careful(oop(p));
-    if (size == 0) {
-      return p;  // failed at p
-    } else {
-      p += size;
-    }
-  }
-  return NULL; // all done
-}
-
 // Very general, slow implementation.
 HeapWord* ContiguousSpace::block_start_const(const void* p) const {
   assert(MemRegion(bottom(), end()).contains(p),
--- a/src/hotspot/share/gc/shared/space.hpp	Wed Nov 20 10:37:46 2019 +0100
+++ b/src/hotspot/share/gc/shared/space.hpp	Wed Nov 20 10:37:46 2019 +0100
@@ -94,10 +94,6 @@
     return (HeapWord*)obj >= saved_mark_word();
   }
 
-  virtual MemRegionClosure* preconsumptionDirtyCardClosure() const {
-    return NULL;
-  }
-
   // Returns a subregion of the space containing only the allocated objects in
   // the space.
   virtual MemRegion used_region() const = 0;
@@ -353,7 +349,6 @@
 // definition of scanned_block_size/scanned_block_is_obj respectively.
 class CompactibleSpace: public Space {
   friend class VMStructs;
-  friend class CompactibleFreeListSpace;
 private:
   HeapWord* _compaction_top;
   CompactibleSpace* _next_compaction_space;
@@ -459,9 +454,6 @@
   HeapWord* _first_dead;
   HeapWord* _end_of_live;
 
-  // Minimum size of a free block.
-  virtual size_t minimum_free_block_size() const { return 0; }
-
   // This the function is invoked when an allocation of an object covering
   // "start" to "end occurs crosses the threshold; returns the next
   // threshold.  (The default implementation does nothing.)
@@ -582,14 +574,6 @@
   void oop_iterate(OopIterateClosure* cl);
   void object_iterate(ObjectClosure* blk);
 
-  // Iterate over as many initialized objects in the space as possible,
-  // calling "cl.do_object_careful" on each. Return NULL if all objects
-  // in the space (at the start of the iteration) were iterated over.
-  // Return an address indicating the extent of the iteration in the
-  // event that the iteration had to return because of finding an
-  // uninitialized object in the space, or if the closure "cl"
-  // signaled early termination.
-  HeapWord* object_iterate_careful(ObjectClosureCareful* cl);
   HeapWord* concurrent_iteration_safe_limit() {
     assert(_concurrent_iteration_safe_limit <= top(),
            "_concurrent_iteration_safe_limit update missed");
@@ -602,10 +586,6 @@
     _concurrent_iteration_safe_limit = new_limit;
   }
 
-  // In support of parallel oop_iterate.
-  template <typename OopClosureType>
-  void par_oop_iterate(MemRegion mr, OopClosureType* blk);
-
   // Compaction support
   virtual void reset_after_compaction() {
     assert(compaction_top() >= bottom() && compaction_top() <= end(), "should point inside space");
--- a/src/hotspot/share/gc/shared/space.inline.hpp	Wed Nov 20 10:37:46 2019 +0100
+++ b/src/hotspot/share/gc/shared/space.inline.hpp	Wed Nov 20 10:37:46 2019 +0100
@@ -377,14 +377,4 @@
   set_saved_mark_word(p);
 }
 
-template <typename OopClosureType>
-void ContiguousSpace::par_oop_iterate(MemRegion mr, OopClosureType* blk) {
-  HeapWord* obj_addr = mr.start();
-  HeapWord* limit = mr.end();
-  while (obj_addr < limit) {
-    assert(oopDesc::is_oop(oop(obj_addr)), "Should be an oop");
-    obj_addr += oop(obj_addr)->oop_iterate_size(blk);
-  }
-}
-
 #endif // SHARE_GC_SHARED_SPACE_INLINE_HPP
--- a/src/hotspot/share/memory/freeList.hpp	Wed Nov 20 10:37:46 2019 +0100
+++ b/src/hotspot/share/memory/freeList.hpp	Wed Nov 20 10:37:46 2019 +0100
@@ -39,7 +39,6 @@
 
 template <class Chunk_t>
 class FreeList {
-  friend class CompactibleFreeListSpace;
   friend class VMStructs;
 
  private:
--- a/src/hotspot/share/memory/iterator.hpp	Wed Nov 20 10:37:46 2019 +0100
+++ b/src/hotspot/share/memory/iterator.hpp	Wed Nov 20 10:37:46 2019 +0100
@@ -199,34 +199,6 @@
   ObjectToOopClosure(OopIterateClosure* cl) : _cl(cl) {}
 };
 
-// A version of ObjectClosure that is expected to be robust
-// in the face of possibly uninitialized objects.
-class ObjectClosureCareful : public ObjectClosure {
- public:
-  virtual size_t do_object_careful_m(oop p, MemRegion mr) = 0;
-  virtual size_t do_object_careful(oop p) = 0;
-};
-
-// The following are used in CompactibleFreeListSpace and
-// ConcurrentMarkSweepGeneration.
-
-// Blk closure (abstract class)
-class BlkClosure : public StackObj {
- public:
-  virtual size_t do_blk(HeapWord* addr) = 0;
-};
-
-// A version of BlkClosure that is expected to be robust
-// in the face of possibly uninitialized objects.
-class BlkClosureCareful : public BlkClosure {
- public:
-  size_t do_blk(HeapWord* addr) {
-    guarantee(false, "call do_blk_careful instead");
-    return 0;
-  }
-  virtual size_t do_blk_careful(HeapWord* addr) = 0;
-};
-
 // SpaceClosure is used for iterating over spaces
 
 class Space;