< prev index next >

src/hotspot/share/gc/z/zBarrierSet.inline.hpp

Print this page

 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 #ifndef SHARE_GC_Z_ZBARRIERSET_INLINE_HPP
 25 #define SHARE_GC_Z_ZBARRIERSET_INLINE_HPP
 26 
 27 #include "gc/z/zBarrierSet.hpp"
 28 
 29 #include "gc/shared/accessBarrierSupport.inline.hpp"
 30 #include "gc/z/zBarrier.inline.hpp"

 31 #include "utilities/debug.hpp"
 32 
 33 template <DecoratorSet decorators, typename BarrierSetT>
 34 template <DecoratorSet expected>
 35 inline void ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::verify_decorators_present() {
 36   if ((decorators & expected) == 0) {
 37     fatal("Using unsupported access decorators");
 38   }
 39 }
 40 
 41 template <DecoratorSet decorators, typename BarrierSetT>
 42 template <DecoratorSet expected>
 43 inline void ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::verify_decorators_absent() {
 44   if ((decorators & expected) != 0) {
 45     fatal("Using unsupported access decorators");
 46   }
 47 }
 48 
 49 template <DecoratorSet decorators, typename BarrierSetT>
 50 inline oop* ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::field_addr(oop base, ptrdiff_t offset) {

222 }
223 
224 template <DecoratorSet decorators, typename BarrierSetT>
225 template <typename T>
226 inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_cmpxchg_not_in_heap(T* addr, oop compare_value, oop new_value) {
227   verify_decorators_present<ON_STRONG_OOP_REF>();
228   verify_decorators_absent<AS_NO_KEEPALIVE>();
229 
230   return Raw::oop_atomic_cmpxchg_not_in_heap(addr, compare_value, new_value);
231 }
232 
233 template <DecoratorSet decorators, typename BarrierSetT>
234 template <typename T>
235 inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_not_in_heap(T* addr, oop new_value) {
236   verify_decorators_present<ON_STRONG_OOP_REF>();
237   verify_decorators_absent<AS_NO_KEEPALIVE>();
238 
239   return Raw::oop_atomic_xchg_not_in_heap(addr, new_value);
240 }
241 




242 #endif // SHARE_GC_Z_ZBARRIERSET_INLINE_HPP

 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 #ifndef SHARE_GC_Z_ZBARRIERSET_INLINE_HPP
 25 #define SHARE_GC_Z_ZBARRIERSET_INLINE_HPP
 26 
 27 #include "gc/z/zBarrierSet.hpp"
 28 
 29 #include "gc/shared/accessBarrierSupport.inline.hpp"
 30 #include "gc/z/zBarrier.inline.hpp"
 31 #include "gc/z/zCollectedHeap.inline.hpp"
 32 #include "utilities/debug.hpp"
 33 
 34 template <DecoratorSet decorators, typename BarrierSetT>
 35 template <DecoratorSet expected>
 36 inline void ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::verify_decorators_present() {
 37   if ((decorators & expected) == 0) {
 38     fatal("Using unsupported access decorators");
 39   }
 40 }
 41 
 42 template <DecoratorSet decorators, typename BarrierSetT>
 43 template <DecoratorSet expected>
 44 inline void ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::verify_decorators_absent() {
 45   if ((decorators & expected) != 0) {
 46     fatal("Using unsupported access decorators");
 47   }
 48 }
 49 
 50 template <DecoratorSet decorators, typename BarrierSetT>
 51 inline oop* ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::field_addr(oop base, ptrdiff_t offset) {

223 }
224 
225 template <DecoratorSet decorators, typename BarrierSetT>
226 template <typename T>
227 inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_cmpxchg_not_in_heap(T* addr, oop compare_value, oop new_value) {
228   verify_decorators_present<ON_STRONG_OOP_REF>();
229   verify_decorators_absent<AS_NO_KEEPALIVE>();
230 
231   return Raw::oop_atomic_cmpxchg_not_in_heap(addr, compare_value, new_value);
232 }
233 
234 template <DecoratorSet decorators, typename BarrierSetT>
235 template <typename T>
236 inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_not_in_heap(T* addr, oop new_value) {
237   verify_decorators_present<ON_STRONG_OOP_REF>();
238   verify_decorators_absent<AS_NO_KEEPALIVE>();
239 
240   return Raw::oop_atomic_xchg_not_in_heap(addr, new_value);
241 }
242 
243 inline bool ZBarrierSet::requires_barriers(oop obj) {
244   return ZCollectedHeap::heap()->ZCollectedHeap::requires_barriers(obj);
245 }
246 
247 #endif // SHARE_GC_Z_ZBARRIERSET_INLINE_HPP
< prev index next >