# HG changeset patch # User pliden # Date 1574242666 -3600 # Node ID 0c2e1808f800951754992523c48651b3e4cad7a5 # Parent 1152339c298a4ccece460c683585fda00cb89aa4 8234438: Remove some CMS leftovers Reviewed-by: kbarrett, sjohanss diff -r 1152339c298a -r 0c2e1808f800 src/hotspot/share/gc/shared/space.cpp --- 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), diff -r 1152339c298a -r 0c2e1808f800 src/hotspot/share/gc/shared/space.hpp --- 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 - 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"); diff -r 1152339c298a -r 0c2e1808f800 src/hotspot/share/gc/shared/space.inline.hpp --- 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 -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 diff -r 1152339c298a -r 0c2e1808f800 src/hotspot/share/memory/freeList.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 FreeList { - friend class CompactibleFreeListSpace; friend class VMStructs; private: diff -r 1152339c298a -r 0c2e1808f800 src/hotspot/share/memory/iterator.hpp --- 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;