< prev index next >

src/hotspot/share/gc/shared/barrierSet.hpp

Print this page

 74   BarrierSetC1* _barrier_set_c1;
 75   BarrierSetC2* _barrier_set_c2;
 76   BarrierSetNMethod* _barrier_set_nmethod;
 77 
 78 public:
 79   // Metafunction mapping a class derived from BarrierSet to the
 80   // corresponding Name enum tag.
 81   template<typename T> struct GetName;
 82 
 83   // Metafunction mapping a Name enum type to the corresponding
 84   // lass derived from BarrierSet.
 85   template<BarrierSet::Name T> struct GetType;
 86 
 87   // Note: This is not presently the Name corresponding to the
 88   // concrete class of this object.
 89   BarrierSet::Name kind() const { return _fake_rtti.concrete_tag(); }
 90 
 91   // Test whether this object is of the type corresponding to bsn.
 92   bool is_a(BarrierSet::Name bsn) const { return _fake_rtti.has_tag(bsn); }
 93 



 94   // End of fake RTTI support.
 95 
 96 protected:
 97   BarrierSet(BarrierSetAssembler* barrier_set_assembler,
 98              BarrierSetC1* barrier_set_c1,
 99              BarrierSetC2* barrier_set_c2,
100              BarrierSetNMethod* barrier_set_nmethod,
101              const FakeRtti& fake_rtti) :
102     _fake_rtti(fake_rtti),
103     _barrier_set_assembler(barrier_set_assembler),
104     _barrier_set_c1(barrier_set_c1),
105     _barrier_set_c2(barrier_set_c2),
106     _barrier_set_nmethod(barrier_set_nmethod) {}
107   ~BarrierSet() { }
108 
109   template <class BarrierSetAssemblerT>
110   static BarrierSetAssembler* make_barrier_set_assembler() {
111     return NOT_ZERO(new BarrierSetAssemblerT()) ZERO_ONLY(NULL);
112   }
113 
114   template <class BarrierSetC1T>
115   static BarrierSetC1* make_barrier_set_c1() {
116     return COMPILER1_PRESENT(new BarrierSetC1T()) NOT_COMPILER1(NULL);
117   }
118 
119   template <class BarrierSetC2T>
120   static BarrierSetC2* make_barrier_set_c2() {
121     return COMPILER2_PRESENT(new BarrierSetC2T()) NOT_COMPILER2(NULL);
122   }
123 
124 public:
125   // Support for optimizing compilers to call the barrier set on slow path allocations
126   // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks.

 74   BarrierSetC1* _barrier_set_c1;
 75   BarrierSetC2* _barrier_set_c2;
 76   BarrierSetNMethod* _barrier_set_nmethod;
 77 
 78 public:
 79   // Metafunction mapping a class derived from BarrierSet to the
 80   // corresponding Name enum tag.
 81   template<typename T> struct GetName;
 82 
 83   // Metafunction mapping a Name enum type to the corresponding
 84   // lass derived from BarrierSet.
 85   template<BarrierSet::Name T> struct GetType;
 86 
 87   // Note: This is not presently the Name corresponding to the
 88   // concrete class of this object.
 89   BarrierSet::Name kind() const { return _fake_rtti.concrete_tag(); }
 90 
 91   // Test whether this object is of the type corresponding to bsn.
 92   bool is_a(BarrierSet::Name bsn) const { return _fake_rtti.has_tag(bsn); }
 93 
 94   // Loom support
 95   static bool requires_barriers(oop obj);
 96 
 97   // End of fake RTTI support.
 98 
 99 protected:
100   BarrierSet(BarrierSetAssembler* barrier_set_assembler,
101              BarrierSetC1* barrier_set_c1,
102              BarrierSetC2* barrier_set_c2,
103              BarrierSetNMethod* barrier_set_nmethod,
104              const FakeRtti& fake_rtti);





105   ~BarrierSet() { }
106 
107   template <class BarrierSetAssemblerT>
108   static BarrierSetAssembler* make_barrier_set_assembler() {
109     return NOT_ZERO(new BarrierSetAssemblerT()) ZERO_ONLY(NULL);
110   }
111 
112   template <class BarrierSetC1T>
113   static BarrierSetC1* make_barrier_set_c1() {
114     return COMPILER1_PRESENT(new BarrierSetC1T()) NOT_COMPILER1(NULL);
115   }
116 
117   template <class BarrierSetC2T>
118   static BarrierSetC2* make_barrier_set_c2() {
119     return COMPILER2_PRESENT(new BarrierSetC2T()) NOT_COMPILER2(NULL);
120   }
121 
122 public:
123   // Support for optimizing compilers to call the barrier set on slow path allocations
124   // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks.
< prev index next >