< prev index next > src/hotspot/share/gc/shared/barrierSet.hpp
BarrierSetC2
#include "utilities/fakeRttiSupport.hpp"
#include "utilities/macros.hpp"
class BarrierSetAssembler;
class BarrierSetC1;
+class BarrierSetC2;
class JavaThread;
// This class provides the interface between a barrier implementation and
// the rest of the system.
private:
FakeRtti _fake_rtti;
BarrierSetAssembler* _barrier_set_assembler;
BarrierSetC1* _barrier_set_c1;
+ BarrierSetC2* _barrier_set_c2;
public:
// Metafunction mapping a class derived from BarrierSet to the
// corresponding Name enum tag.
template<typename T> struct GetName;
// End of fake RTTI support.
protected:
BarrierSet(BarrierSetAssembler* barrier_set_assembler,
BarrierSetC1* barrier_set_c1,
+ BarrierSetC2* barrier_set_c2,
const FakeRtti& fake_rtti) :
_fake_rtti(fake_rtti),
_barrier_set_assembler(barrier_set_assembler),
- _barrier_set_c1(barrier_set_c1) {}
+ _barrier_set_c1(barrier_set_c1),
+ _barrier_set_c2(barrier_set_c2) {}
~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);
}
+ template <class BarrierSetC2T>
+ BarrierSetC2* make_barrier_set_c2() {
+ return COMPILER2_PRESENT(new BarrierSetC2T()) NOT_COMPILER2(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
BarrierSetC1* barrier_set_c1() {
assert(_barrier_set_c1 != NULL, "should be set");
return _barrier_set_c1;
}
+ BarrierSetC2* barrier_set_c2() {
+ assert(_barrier_set_c2 != NULL, "should be set");
+ return _barrier_set_c2;
+ }
+
// 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 >