8210063: ZGC: Enable load barriers for IN_NATIVE runtime barriers
Reviewed-by: pliden
--- a/src/hotspot/share/gc/z/zBarrierSet.inline.hpp Thu Aug 30 08:59:23 2018 +0200
+++ b/src/hotspot/share/gc/z/zBarrierSet.inline.hpp Thu Aug 30 09:12:07 2018 +0200
@@ -210,16 +210,10 @@
template <DecoratorSet decorators, typename BarrierSetT>
template <typename T>
inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_load_not_in_heap(T* addr) {
- const oop o = Raw::oop_load_not_in_heap(addr);
+ verify_decorators_absent<ON_UNKNOWN_OOP_REF>();
- if (HasDecorator<decorators, ON_PHANTOM_OOP_REF>::value) {
- return load_barrier_on_oop_field_preloaded(addr, o);
- }
-
- verify_decorators_present<ON_STRONG_OOP_REF>();
- verify_decorators_absent<AS_NO_KEEPALIVE>();
-
- return o;
+ const oop o = Raw::oop_load_not_in_heap(addr);
+ return load_barrier_on_oop_field_preloaded(addr, o);
}
template <DecoratorSet decorators, typename BarrierSetT>