8210063: ZGC: Enable load barriers for IN_NATIVE runtime barriers
authoreosterlund
Thu, 30 Aug 2018 09:12:07 +0200
changeset 51588 f36e08f052b1
parent 51587 b459c731901b
child 51589 9aa7ac61e68c
8210063: ZGC: Enable load barriers for IN_NATIVE runtime barriers Reviewed-by: pliden
src/hotspot/share/gc/z/zBarrierSet.inline.hpp
--- 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>