# HG changeset patch # User stefank # Date 1396011791 -3600 # Node ID 2518569e1e016f92808e3e9518dff995f2bfb447 # Parent 3de0cad00ae184ede4bdadcf12a245ca264d7e9c 8038628: Remove unused Closure::abort() Reviewed-by: coleenp, jmasa diff -r 3de0cad00ae1 -r 2518569e1e01 hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Wed Mar 12 15:25:35 2014 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Fri Mar 28 14:03:11 2014 +0100 @@ -472,9 +472,6 @@ } else if (!g1h->is_obj_dead(obj)) { cl->do_object(obj); } - if (cl->abort()) return cur; - // The check above must occur before the operation below, since an - // abort might invalidate the "size" operation. cur += obj->size(); } return NULL; diff -r 3de0cad00ae1 -r 2518569e1e01 hotspot/src/share/vm/memory/iterator.hpp --- a/hotspot/src/share/vm/memory/iterator.hpp Wed Mar 12 15:25:35 2014 +0100 +++ b/hotspot/src/share/vm/memory/iterator.hpp Fri Mar 28 14:03:11 2014 +0100 @@ -30,8 +30,6 @@ #include "runtime/prefetch.hpp" #include "utilities/top.hpp" -// The following classes are C++ `closures` for iterating over objects, roots and spaces - class CodeBlob; class nmethod; class ReferenceProcessor; @@ -39,22 +37,11 @@ class KlassClosure; class ClassLoaderData; -// Closure provides abortability. +// The following classes are C++ `closures` for iterating over objects, roots and spaces -class Closure : public StackObj { - protected: - bool _abort; - void set_abort() { _abort = true; } - public: - Closure() : _abort(false) {} - // A subtype can use this mechanism to indicate to some iterator mapping - // functions that the iteration should cease. - bool abort() { return _abort; } - void clear_abort() { _abort = false; } -}; +class Closure : public StackObj { }; // OopClosure is used for iterating through references to Java objects. - class OopClosure : public Closure { public: virtual void do_oop(oop* o) = 0;