< prev index next >

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

Print this page

 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_ZBARRIERSET_HPP
 25 #define SHARE_GC_Z_ZBARRIERSET_HPP
 26 
 27 #include "gc/shared/barrierSet.hpp"
 28 
 29 class ZBarrierSetAssembler;
 30 
 31 class ZBarrierSet : public BarrierSet {
 32 public:
 33   ZBarrierSet();
 34 
 35   static ZBarrierSetAssembler* assembler();
 36   static bool barrier_needed(DecoratorSet decorators, BasicType type);
 37 




 38   virtual void on_thread_create(Thread* thread);
 39   virtual void on_thread_destroy(Thread* thread);
 40   virtual void on_thread_attach(Thread* thread);
 41   virtual void on_thread_detach(Thread* thread);
 42 
 43   virtual void print_on(outputStream* st) const;
 44 
 45   template <DecoratorSet decorators, typename BarrierSetT = ZBarrierSet>
 46   class AccessBarrier : public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
 47   private:
 48     typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
 49 
 50     template <DecoratorSet expected>
 51     static void verify_decorators_present();
 52 
 53     template <DecoratorSet expected>
 54     static void verify_decorators_absent();
 55 
 56     static oop* field_addr(oop base, ptrdiff_t offset);
 57 

 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_ZBARRIERSET_HPP
 25 #define SHARE_GC_Z_ZBARRIERSET_HPP
 26 
 27 #include "gc/shared/barrierSet.hpp"
 28 
 29 class ZBarrierSetAssembler;
 30 
 31 class ZBarrierSet : public BarrierSet {
 32 public:
 33   ZBarrierSet();
 34 
 35   static ZBarrierSetAssembler* assembler();
 36   static bool barrier_needed(DecoratorSet decorators, BasicType type);
 37 
 38   // Loom support
 39   static constexpr bool is_concurrent_gc() { return true; }
 40   static bool requires_barriers(oop obj);
 41 
 42   virtual void on_thread_create(Thread* thread);
 43   virtual void on_thread_destroy(Thread* thread);
 44   virtual void on_thread_attach(Thread* thread);
 45   virtual void on_thread_detach(Thread* thread);
 46 
 47   virtual void print_on(outputStream* st) const;
 48 
 49   template <DecoratorSet decorators, typename BarrierSetT = ZBarrierSet>
 50   class AccessBarrier : public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
 51   private:
 52     typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
 53 
 54     template <DecoratorSet expected>
 55     static void verify_decorators_present();
 56 
 57     template <DecoratorSet expected>
 58     static void verify_decorators_absent();
 59 
 60     static oop* field_addr(oop base, ptrdiff_t offset);
 61 
< prev index next >