< prev index next >

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

BarrierSetC1

*** 31,42 **** #include "oops/accessBackend.hpp" #include "oops/oopsHierarchy.hpp" #include "utilities/fakeRttiSupport.hpp" #include "utilities/macros.hpp" - class JavaThread; class BarrierSetAssembler; // This class provides the interface between a barrier implementation and // the rest of the system. class BarrierSet: public CHeapObj<mtGC> { --- 31,43 ---- #include "oops/accessBackend.hpp" #include "oops/oopsHierarchy.hpp" #include "utilities/fakeRttiSupport.hpp" #include "utilities/macros.hpp" class BarrierSetAssembler; + class BarrierSetC1; + class JavaThread; // This class provides the interface between a barrier implementation and // the rest of the system. class BarrierSet: public CHeapObj<mtGC> { ***************
*** 66,75 **** --- 67,77 ---- typedef FakeRttiSupport<BarrierSet, Name> FakeRtti; private: FakeRtti _fake_rtti; BarrierSetAssembler* _barrier_set_assembler; + BarrierSetC1* _barrier_set_c1; public: // Metafunction mapping a class derived from BarrierSet to the // corresponding Name enum tag. template<typename T> struct GetName; ***************
*** 86,105 **** bool is_a(BarrierSet::Name bsn) const { return _fake_rtti.has_tag(bsn); } // End of fake RTTI support. protected: ! BarrierSet(BarrierSetAssembler* barrier_set_assembler, const FakeRtti& fake_rtti) : _fake_rtti(fake_rtti), ! _barrier_set_assembler(barrier_set_assembler) { } ~BarrierSet() { } template <class BarrierSetAssemblerT> BarrierSetAssembler* make_barrier_set_assembler() { return NOT_ZERO(new BarrierSetAssemblerT()) ZERO_ONLY(NULL); } public: // Support for optimizing compilers to call the barrier set on slow path allocations // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks. // The allocation is safe to use iff it returns true. If not, the slow-path allocation // is redone until it succeeds. This can e.g. prevent allocations from the slow path --- 88,115 ---- bool is_a(BarrierSet::Name bsn) const { return _fake_rtti.has_tag(bsn); } // End of fake RTTI support. protected: ! BarrierSet(BarrierSetAssembler* barrier_set_assembler, ! BarrierSetC1* barrier_set_c1, ! const FakeRtti& fake_rtti) : _fake_rtti(fake_rtti), ! _barrier_set_assembler(barrier_set_assembler), ! _barrier_set_c1(barrier_set_c1) {} ~BarrierSet() { } template <class BarrierSetAssemblerT> BarrierSetAssembler* make_barrier_set_assembler() { return NOT_ZERO(new BarrierSetAssemblerT()) ZERO_ONLY(NULL); } + template <class BarrierSetC1T> + BarrierSetC1* make_barrier_set_c1() { + return COMPILER1_PRESENT(new BarrierSetC1T()) NOT_COMPILER1(NULL); + } + public: // Support for optimizing compilers to call the barrier set on slow path allocations // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks. // The allocation is safe to use iff it returns true. If not, the slow-path allocation // is redone until it succeeds. This can e.g. prevent allocations from the slow path ***************
*** 121,130 **** --- 131,145 ---- BarrierSetAssembler* barrier_set_assembler() { assert(_barrier_set_assembler != NULL, "should be set"); return _barrier_set_assembler; } + BarrierSetC1* barrier_set_c1() { + assert(_barrier_set_c1 != NULL, "should be set"); + return _barrier_set_c1; + } + // The AccessBarrier of a BarrierSet subclass is called by the Access API // (cf. oops/access.hpp) to perform decorated accesses. GC implementations // may override these default access operations by declaring an // AccessBarrier class in its BarrierSet. Its accessors will then be // automatically resolved at runtime.
< prev index next >