< prev index next >

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

Print this page




  78   // These are the more general virtual versions.
  79   void write_ref_field_pre_work(oop* field, oop new_val);
  80   void write_ref_field_pre_work(narrowOop* field, oop new_val);
  81   void write_ref_field_pre_work(void* field, oop new_val);
  82 
  83   void write_ref_field_work(void* v, oop o, bool release = false);
  84   void write_region(MemRegion mr);
  85 
  86   virtual void on_thread_create(Thread* thread);
  87   virtual void on_thread_destroy(Thread* thread);
  88   virtual void on_thread_attach(Thread* thread);
  89   virtual void on_thread_detach(Thread* thread);
  90 
  91   static inline oop resolve_forwarded_not_null(oop p);
  92   static inline oop resolve_forwarded(oop p);
  93 
  94   void storeval_barrier(oop obj);
  95   void keep_alive_barrier(oop obj);
  96 
  97   oop load_reference_barrier(oop obj);
  98   oop load_reference_barrier_mutator(oop obj);
  99   oop load_reference_barrier_not_null(oop obj);






 100 
 101   void enqueue(oop obj);
 102 
 103 private:
 104   template <class T, bool STOREVAL_WRITE_BARRIER>
 105   void write_ref_array_loop(HeapWord* start, size_t count);
 106 
 107   oop load_reference_barrier_impl(oop obj);
 108 
 109   static void keep_alive_if_weak(DecoratorSet decorators, oop value) {
 110     assert((decorators & ON_UNKNOWN_OOP_REF) == 0, "Reference strength must be known");
 111     const bool on_strong_oop_ref = (decorators & ON_STRONG_OOP_REF) != 0;
 112     const bool peek              = (decorators & AS_NO_KEEPALIVE) != 0;
 113     if (!peek && !on_strong_oop_ref && value != NULL) {
 114       ShenandoahBarrierSet::barrier_set()->keep_alive_barrier(value);
 115     }
 116   }
 117 
 118   template <typename T>
 119   bool arraycopy_loop_1(T* src, T* dst, size_t length, Klass* bound,




  78   // These are the more general virtual versions.
  79   void write_ref_field_pre_work(oop* field, oop new_val);
  80   void write_ref_field_pre_work(narrowOop* field, oop new_val);
  81   void write_ref_field_pre_work(void* field, oop new_val);
  82 
  83   void write_ref_field_work(void* v, oop o, bool release = false);
  84   void write_region(MemRegion mr);
  85 
  86   virtual void on_thread_create(Thread* thread);
  87   virtual void on_thread_destroy(Thread* thread);
  88   virtual void on_thread_attach(Thread* thread);
  89   virtual void on_thread_detach(Thread* thread);
  90 
  91   static inline oop resolve_forwarded_not_null(oop p);
  92   static inline oop resolve_forwarded(oop p);
  93 
  94   void storeval_barrier(oop obj);
  95   void keep_alive_barrier(oop obj);
  96 
  97   oop load_reference_barrier(oop obj);

  98   oop load_reference_barrier_not_null(oop obj);
  99 
 100   oop load_reference_barrier_mutator(oop obj, oop* load_addr);
 101   oop load_reference_barrier_mutator(oop obj, narrowOop* load_addr);
 102 
 103   template <class T>
 104   oop load_reference_barrier_mutator_work(oop obj, T* load_addr);
 105 
 106   void enqueue(oop obj);
 107 
 108 private:
 109   template <class T, bool STOREVAL_WRITE_BARRIER>
 110   void write_ref_array_loop(HeapWord* start, size_t count);
 111 
 112   oop load_reference_barrier_impl(oop obj);
 113 
 114   static void keep_alive_if_weak(DecoratorSet decorators, oop value) {
 115     assert((decorators & ON_UNKNOWN_OOP_REF) == 0, "Reference strength must be known");
 116     const bool on_strong_oop_ref = (decorators & ON_STRONG_OOP_REF) != 0;
 117     const bool peek              = (decorators & AS_NO_KEEPALIVE) != 0;
 118     if (!peek && !on_strong_oop_ref && value != NULL) {
 119       ShenandoahBarrierSet::barrier_set()->keep_alive_barrier(value);
 120     }
 121   }
 122 
 123   template <typename T>
 124   bool arraycopy_loop_1(T* src, T* dst, size_t length, Klass* bound,


< prev index next >