40 CardTableExtension,
41 G1SATBCT,
42 G1SATBCTLogging,
43 Other,
44 Uninit
45 };
46
47 enum Flags {
48 None = 0,
49 TargetUninitialized = 1
50 };
51 protected:
52 // Some barrier sets create tables whose elements correspond to parts of
53 // the heap; the CardTableModRefBS is an example. Such barrier sets will
54 // normally reserve space for such tables, and commit parts of the table
55 // "covering" parts of the heap that are committed. At most one covered
56 // region per generation is needed.
57 static const int _max_covered_regions = 2;
58 Name _kind;
59
60 public:
61
62 BarrierSet() { _kind = Uninit; }
63 // To get around prohibition on RTTI.
64 BarrierSet::Name kind() { return _kind; }
65 virtual bool is_a(BarrierSet::Name bsn) = 0;
66
67 // These operations indicate what kind of barriers the BarrierSet has.
68 virtual bool has_read_ref_barrier() = 0;
69 virtual bool has_read_prim_barrier() = 0;
70 virtual bool has_write_ref_barrier() = 0;
71 virtual bool has_write_ref_pre_barrier() = 0;
72 virtual bool has_write_prim_barrier() = 0;
73
74 // These functions indicate whether a particular access of the given
75 // kinds requires a barrier.
76 virtual bool read_ref_needs_barrier(void* field) = 0;
77 virtual bool read_prim_needs_barrier(HeapWord* field, size_t bytes) = 0;
78 virtual bool write_prim_needs_barrier(HeapWord* field, size_t bytes,
79 juint val1, juint val2) = 0;
80
81 // The first four operations provide a direct implementation of the
82 // barrier set. An interpreter loop, for example, could call these
|
40 CardTableExtension,
41 G1SATBCT,
42 G1SATBCTLogging,
43 Other,
44 Uninit
45 };
46
47 enum Flags {
48 None = 0,
49 TargetUninitialized = 1
50 };
51 protected:
52 // Some barrier sets create tables whose elements correspond to parts of
53 // the heap; the CardTableModRefBS is an example. Such barrier sets will
54 // normally reserve space for such tables, and commit parts of the table
55 // "covering" parts of the heap that are committed. At most one covered
56 // region per generation is needed.
57 static const int _max_covered_regions = 2;
58 Name _kind;
59
60 BarrierSet(Name kind) { _kind = kind; }
61 ~BarrierSet() { }
62
63 public:
64
65 // To get around prohibition on RTTI.
66 BarrierSet::Name kind() { return _kind; }
67 virtual bool is_a(BarrierSet::Name bsn) = 0;
68
69 // These operations indicate what kind of barriers the BarrierSet has.
70 virtual bool has_read_ref_barrier() = 0;
71 virtual bool has_read_prim_barrier() = 0;
72 virtual bool has_write_ref_barrier() = 0;
73 virtual bool has_write_ref_pre_barrier() = 0;
74 virtual bool has_write_prim_barrier() = 0;
75
76 // These functions indicate whether a particular access of the given
77 // kinds requires a barrier.
78 virtual bool read_ref_needs_barrier(void* field) = 0;
79 virtual bool read_prim_needs_barrier(HeapWord* field, size_t bytes) = 0;
80 virtual bool write_prim_needs_barrier(HeapWord* field, size_t bytes,
81 juint val1, juint val2) = 0;
82
83 // The first four operations provide a direct implementation of the
84 // barrier set. An interpreter loop, for example, could call these
|