< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahOopClosures.hpp

Print this page
rev 54386 : 8221766: Load-reference barriers for Shenandoah


  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHOOPCLOSURES_HPP
  25 #define SHARE_GC_SHENANDOAH_SHENANDOAHOOPCLOSURES_HPP
  26 
  27 #include "gc/shared/referenceProcessor.hpp"
  28 #include "gc/shenandoah/shenandoahHeap.hpp"
  29 #include "gc/shenandoah/shenandoahStrDedupQueue.hpp"
  30 #include "gc/shenandoah/shenandoahTaskqueue.hpp"
  31 #include "gc/shenandoah/shenandoahTraversalGC.hpp"
  32 #include "memory/iterator.hpp"
  33 #include "runtime/thread.hpp"
  34 
  35 enum UpdateRefsMode {
  36   NONE,       // No reference updating
  37   RESOLVE,    // Only a read-barrier (no reference updating)
  38   SIMPLE,     // Reference updating using simple store
  39   CONCURRENT  // Reference updating using CAS
  40 };
  41 
  42 enum StringDedupMode {
  43   NO_DEDUP,      // Do not do anything for String deduplication
  44   ENQUEUE_DEDUP, // Enqueue candidate Strings for deduplication
  45 };
  46 
  47 class ShenandoahMarkRefsSuperClosure : public MetadataVisitingOopIterateClosure {
  48 private:
  49   ShenandoahObjToScanQueue* _queue;
  50   ShenandoahHeap* _heap;
  51   ShenandoahMarkingContext* const _mark_context;
  52 
  53 protected:
  54   template <class T, UpdateRefsMode UPDATE_MODE, StringDedupMode STRING_DEDUP>
  55   void work(T *p);
  56 
  57 public:




  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHOOPCLOSURES_HPP
  25 #define SHARE_GC_SHENANDOAH_SHENANDOAHOOPCLOSURES_HPP
  26 
  27 #include "gc/shared/referenceProcessor.hpp"
  28 #include "gc/shenandoah/shenandoahHeap.hpp"
  29 #include "gc/shenandoah/shenandoahStrDedupQueue.hpp"
  30 #include "gc/shenandoah/shenandoahTaskqueue.hpp"
  31 #include "gc/shenandoah/shenandoahTraversalGC.hpp"
  32 #include "memory/iterator.hpp"
  33 #include "runtime/thread.hpp"
  34 
  35 enum UpdateRefsMode {
  36   NONE,       // No reference updating
  37   RESOLVE,    // Only a resolve (no reference updating)
  38   SIMPLE,     // Reference updating using simple store
  39   CONCURRENT  // Reference updating using CAS
  40 };
  41 
  42 enum StringDedupMode {
  43   NO_DEDUP,      // Do not do anything for String deduplication
  44   ENQUEUE_DEDUP, // Enqueue candidate Strings for deduplication
  45 };
  46 
  47 class ShenandoahMarkRefsSuperClosure : public MetadataVisitingOopIterateClosure {
  48 private:
  49   ShenandoahObjToScanQueue* _queue;
  50   ShenandoahHeap* _heap;
  51   ShenandoahMarkingContext* const _mark_context;
  52 
  53 protected:
  54   template <class T, UpdateRefsMode UPDATE_MODE, StringDedupMode STRING_DEDUP>
  55   void work(T *p);
  56 
  57 public:


< prev index next >