< prev index next >

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

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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_ZOOPCLOSURES_HPP
  25 #define SHARE_GC_Z_ZOOPCLOSURES_HPP
  26 
  27 #include "memory/iterator.hpp"
  28 
  29 class ZLoadBarrierOopClosure : public ExtendedOopClosure {
  30 public:
  31   void do_oop_nv(oop* p);
  32   void do_oop_nv(narrowOop* p);
  33 
  34   virtual void do_oop(oop* p);
  35   virtual void do_oop(narrowOop* p);
  36 
  37 #ifdef ASSERT
  38   virtual bool should_verify_oops() {
  39     return false;
  40   }
  41 #endif
  42 };
  43 
  44 class ZMarkRootOopClosure : public OopClosure {
  45 public:
  46   virtual void do_oop(oop* p);
  47   virtual void do_oop(narrowOop* p);
  48 };
  49 
  50 class ZRelocateRootOopClosure : public OopClosure {
  51 public:
  52   virtual void do_oop(oop* p);
  53   virtual void do_oop(narrowOop* p);
  54 };
  55 
  56 template <bool finalizable>
  57 class ZMarkBarrierOopClosure : public ExtendedOopClosure {
  58 public:
  59   ZMarkBarrierOopClosure();
  60 
  61   void do_oop_nv(oop* p);
  62   void do_oop_nv(narrowOop* p);
  63 
  64   virtual void do_oop(oop* p);
  65   virtual void do_oop(narrowOop* p);
  66 
  67 #ifdef ASSERT
  68   virtual bool should_verify_oops() {
  69     return false;
  70   }
  71 #endif
  72 };
  73 
  74 class ZPhantomIsAliveObjectClosure : public BoolObjectClosure {
  75 public:
  76   virtual bool do_object_b(oop o);
  77 };
  78 
  79 class ZPhantomKeepAliveOopClosure : public OopClosure {
  80 public:
  81   virtual void do_oop(oop* p);
  82   virtual void do_oop(narrowOop* p);
  83 };
  84 
  85 class ZPhantomCleanOopClosure : public OopClosure {
  86 public:
  87   virtual void do_oop(oop* p);
  88   virtual void do_oop(narrowOop* p);
  89 };
  90 
  91 class ZVerifyHeapOopClosure : public ExtendedOopClosure {
  92 private:
  93   const oop _base;
  94 
  95 public:
  96   ZVerifyHeapOopClosure(oop base);
  97 
  98   virtual void do_oop(oop* p);
  99   virtual void do_oop(narrowOop* p);
 100 
 101 #ifdef ASSERT
 102   // Verification handled by the closure itself.
 103   virtual bool should_verify_oops() {
 104     return false;
 105   }
 106 #endif
 107 };
 108 
 109 class ZVerifyRootOopClosure : public OopClosure {
 110 public:
 111   virtual void do_oop(oop* p);


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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_ZOOPCLOSURES_HPP
  25 #define SHARE_GC_Z_ZOOPCLOSURES_HPP
  26 
  27 #include "memory/iterator.hpp"
  28 
  29 class ZLoadBarrierOopClosure : public BasicOopIterateClosure {
  30 public:



  31   virtual void do_oop(oop* p);
  32   virtual void do_oop(narrowOop* p);
  33 
  34 #ifdef ASSERT
  35   virtual bool should_verify_oops() {
  36     return false;
  37   }
  38 #endif
  39 };
  40 
  41 class ZMarkRootOopClosure : public OopClosure {
  42 public:
  43   virtual void do_oop(oop* p);
  44   virtual void do_oop(narrowOop* p);
  45 };
  46 
  47 class ZRelocateRootOopClosure : public OopClosure {
  48 public:
  49   virtual void do_oop(oop* p);
  50   virtual void do_oop(narrowOop* p);
  51 };
  52 
  53 template <bool finalizable>
  54 class ZMarkBarrierOopClosure : public BasicOopIterateClosure {
  55 public:
  56   ZMarkBarrierOopClosure();
  57 



  58   virtual void do_oop(oop* p);
  59   virtual void do_oop(narrowOop* p);
  60 
  61 #ifdef ASSERT
  62   virtual bool should_verify_oops() {
  63     return false;
  64   }
  65 #endif
  66 };
  67 
  68 class ZPhantomIsAliveObjectClosure : public BoolObjectClosure {
  69 public:
  70   virtual bool do_object_b(oop o);
  71 };
  72 
  73 class ZPhantomKeepAliveOopClosure : public OopClosure {
  74 public:
  75   virtual void do_oop(oop* p);
  76   virtual void do_oop(narrowOop* p);
  77 };
  78 
  79 class ZPhantomCleanOopClosure : public OopClosure {
  80 public:
  81   virtual void do_oop(oop* p);
  82   virtual void do_oop(narrowOop* p);
  83 };
  84 
  85 class ZVerifyHeapOopClosure : public BasicOopIterateClosure {
  86 private:
  87   const oop _base;
  88 
  89 public:
  90   ZVerifyHeapOopClosure(oop base);
  91 
  92   virtual void do_oop(oop* p);
  93   virtual void do_oop(narrowOop* p);
  94 
  95 #ifdef ASSERT
  96   // Verification handled by the closure itself.
  97   virtual bool should_verify_oops() {
  98     return false;
  99   }
 100 #endif
 101 };
 102 
 103 class ZVerifyRootOopClosure : public OopClosure {
 104 public:
 105   virtual void do_oop(oop* p);
< prev index next >