< prev index next >

src/hotspot/share/gc/z/zHeapIterator.hpp

Print this page




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #ifndef SHARE_GC_Z_ZHEAPITERATOR_HPP
  25 #define SHARE_GC_Z_ZHEAPITERATOR_HPP
  26 
  27 #include "gc/z/zAddressRangeMap.hpp"
  28 #include "gc/z/zGlobals.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "utilities/stack.hpp"
  31 
  32 class ZHeapIteratorBitMap;
  33 
  34 class ZHeapIterator : public StackObj {
  35   friend class ZHeapIteratorRootOopClosure;
  36   friend class ZHeapIteratorPushOopClosure;
  37 
  38 private:
  39   typedef ZAddressRangeMap<ZHeapIteratorBitMap*, ZPageSizeMinShift>         ZVisitMap;
  40   typedef ZAddressRangeMapIterator<ZHeapIteratorBitMap*, ZPageSizeMinShift> ZVisitMapIterator;
  41   typedef Stack<oop, mtGC>                                                  ZVisitStack;
  42 
  43   ZVisitStack _visit_stack;
  44   ZVisitMap   _visit_map;
  45   const bool  _visit_referents;
  46 
  47   size_t object_index_max() const;
  48   size_t object_index(oop obj) const;
  49   ZHeapIteratorBitMap* object_map(oop obj);
  50 
  51   void push(oop obj);
  52   void drain(ObjectClosure* cl);
  53 
  54   bool visit_referents() const;
  55 
  56 public:
  57   ZHeapIterator(bool visit_referents);
  58   ~ZHeapIterator();
  59 
  60   void objects_do(ObjectClosure* cl);
  61 };
  62 
  63 #endif // SHARE_GC_Z_ZHEAPITERATOR_HPP


  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #ifndef SHARE_GC_Z_ZHEAPITERATOR_HPP
  25 #define SHARE_GC_Z_ZHEAPITERATOR_HPP
  26 
  27 #include "gc/z/zAddressRangeMap.hpp"
  28 #include "gc/z/zGlobals.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "utilities/stack.hpp"
  31 
  32 class ZHeapIteratorBitMap;
  33 
  34 class ZHeapIterator : public StackObj {
  35   friend class ZHeapIteratorRootOopClosure;
  36   friend class ZHeapIteratorOopClosure;
  37 
  38 private:
  39   typedef ZAddressRangeMap<ZHeapIteratorBitMap*, ZPageSizeMinShift>         ZVisitMap;
  40   typedef ZAddressRangeMapIterator<ZHeapIteratorBitMap*, ZPageSizeMinShift> ZVisitMapIterator;
  41   typedef Stack<oop, mtGC>                                                  ZVisitStack;
  42 
  43   ZVisitStack _visit_stack;
  44   ZVisitMap   _visit_map;
  45   const bool  _visit_referents;
  46 


  47   ZHeapIteratorBitMap* object_map(oop obj);

  48   void push(oop obj);



  49 
  50 public:
  51   ZHeapIterator(bool visit_referents);
  52   ~ZHeapIterator();
  53 
  54   void objects_do(ObjectClosure* cl);
  55 };
  56 
  57 #endif // SHARE_GC_Z_ZHEAPITERATOR_HPP
< prev index next >