Mercurial > hg > truffle
comparison src/share/vm/memory/barrierSet.hpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | 8a9bb7821e28 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14520:f84115370178 | 14521:29ccc4cbabca |
---|---|
98 virtual void write_ref_field_pre_work( oop* field, oop new_val) {}; | 98 virtual void write_ref_field_pre_work( oop* field, oop new_val) {}; |
99 virtual void write_ref_field_pre_work(narrowOop* field, oop new_val) {}; | 99 virtual void write_ref_field_pre_work(narrowOop* field, oop new_val) {}; |
100 public: | 100 public: |
101 | 101 |
102 // ...then the post-write version. | 102 // ...then the post-write version. |
103 inline void write_ref_field(void* field, oop new_val); | 103 inline void write_ref_field(void* field, oop new_val, bool release = false); |
104 protected: | 104 protected: |
105 virtual void write_ref_field_work(void* field, oop new_val) = 0; | 105 virtual void write_ref_field_work(void* field, oop new_val, bool release = false) = 0; |
106 public: | 106 public: |
107 | 107 |
108 // Invoke the barrier, if any, necessary when writing the "bytes"-byte | 108 // Invoke the barrier, if any, necessary when writing the "bytes"-byte |
109 // value(s) "val1" (and "val2") into the primitive "field". | 109 // value(s) "val1" (and "val2") into the primitive "field". |
110 virtual void write_prim_field(HeapWord* field, size_t bytes, | 110 virtual void write_prim_field(HeapWord* field, size_t bytes, |
122 virtual bool has_write_prim_array_opt() = 0; | 122 virtual bool has_write_prim_array_opt() = 0; |
123 | 123 |
124 virtual bool has_read_region_opt() = 0; | 124 virtual bool has_read_region_opt() = 0; |
125 virtual bool has_write_region_opt() = 0; | 125 virtual bool has_write_region_opt() = 0; |
126 | 126 |
127 // These operations should assert false unless the correponding operation | 127 // These operations should assert false unless the corresponding operation |
128 // above returns true. Otherwise, they should perform an appropriate | 128 // above returns true. Otherwise, they should perform an appropriate |
129 // barrier for an array whose elements are all in the given memory region. | 129 // barrier for an array whose elements are all in the given memory region. |
130 virtual void read_ref_array(MemRegion mr) = 0; | 130 virtual void read_ref_array(MemRegion mr) = 0; |
131 virtual void read_prim_array(MemRegion mr) = 0; | 131 virtual void read_prim_array(MemRegion mr) = 0; |
132 | 132 |
163 // Some barrier sets create tables whose elements correspond to parts of | 163 // Some barrier sets create tables whose elements correspond to parts of |
164 // the heap; the CardTableModRefBS is an example. Such barrier sets will | 164 // the heap; the CardTableModRefBS is an example. Such barrier sets will |
165 // normally reserve space for such tables, and commit parts of the table | 165 // normally reserve space for such tables, and commit parts of the table |
166 // "covering" parts of the heap that are committed. The constructor is | 166 // "covering" parts of the heap that are committed. The constructor is |
167 // passed the maximum number of independently committable subregions to | 167 // passed the maximum number of independently committable subregions to |
168 // be covered, and the "resize_covoered_region" function allows the | 168 // be covered, and the "resize_covered_region" function allows the |
169 // sub-parts of the heap to inform the barrier set of changes of their | 169 // sub-parts of the heap to inform the barrier set of changes of their |
170 // sizes. | 170 // sizes. |
171 BarrierSet(int max_covered_regions) : | 171 BarrierSet(int max_covered_regions) : |
172 _max_covered_regions(max_covered_regions) {} | 172 _max_covered_regions(max_covered_regions) {} |
173 | 173 |