diff --git a/src/hotspot/share/gc/g1/g1BarrierSet.cpp b/src/hotspot/share/gc/g1/g1BarrierSet.cpp index e0235b2..a444109 100644 --- a/src/hotspot/share/gc/g1/g1BarrierSet.cpp +++ b/src/hotspot/share/gc/g1/g1BarrierSet.cpp @@ -33,8 +33,7 @@ #include "runtime/mutexLocker.hpp" #include "runtime/thread.inline.hpp" -G1BarrierSet::G1BarrierSet( - G1CardTable* card_table) : +G1BarrierSet::G1BarrierSet(G1CardTable* card_table) : CardTableModRefBS(card_table, BarrierSet::FakeRtti(BarrierSet::G1BarrierSet)), _dcqs(JavaThread::dirty_card_queue_set()) { } diff --git a/src/hotspot/share/gc/g1/g1BarrierSet.inline.hpp b/src/hotspot/share/gc/g1/g1BarrierSet.inline.hpp index 9e8151b..ced39dc 100644 --- a/src/hotspot/share/gc/g1/g1BarrierSet.inline.hpp +++ b/src/hotspot/share/gc/g1/g1BarrierSet.inline.hpp @@ -28,6 +28,7 @@ #include "gc/g1/g1BarrierSet.hpp" #include "gc/g1/g1CardTable.hpp" #include "gc/shared/accessBarrierSupport.inline.hpp" +#include "oops/oop.inline.hpp" template inline void G1BarrierSet::write_ref_field_pre(T* field) { @@ -36,9 +37,9 @@ inline void G1BarrierSet::write_ref_field_pre(T* field) { return; } - oop heap_oop = RawAccess::oop_load(field); - if (heap_oop != NULL) { - enqueue(heap_oop); + T heap_oop = RawAccess::oop_load(field); + if (oopDesc::is_null(heap_oop)) { + enqueue(oopDesc::decode_heap_oop_not_null(heap_oop)); } } diff --git a/src/hotspot/share/gc/shared/barrierSet.inline.hpp b/src/hotspot/share/gc/shared/barrierSet.inline.hpp index ff3a7ce..26b44e7 100644 --- a/src/hotspot/share/gc/shared/barrierSet.inline.hpp +++ b/src/hotspot/share/gc/shared/barrierSet.inline.hpp @@ -26,7 +26,6 @@ #define SHARE_VM_GC_SHARED_BARRIERSET_INLINE_HPP #include "gc/shared/barrierSet.hpp" -#include "gc/shared/barrierSetConfig.inline.hpp" #include "utilities/align.hpp" // count is number of array elements being written diff --git a/src/hotspot/share/gc/shared/modRefBarrierSet.inline.hpp b/src/hotspot/share/gc/shared/modRefBarrierSet.inline.hpp index a5b3b26..44b2688 100644 --- a/src/hotspot/share/gc/shared/modRefBarrierSet.inline.hpp +++ b/src/hotspot/share/gc/shared/modRefBarrierSet.inline.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_VM_GC_SHARED_MODREFBARRIERSET_INLINE_HPP #define SHARE_VM_GC_SHARED_MODREFBARRIERSET_INLINE_HPP +#include "gc/shared/barrierSet.inline.hpp" #include "gc/shared/modRefBarrierSet.hpp" #include "oops/klass.inline.hpp" #include "oops/objArrayOop.hpp" diff --git a/src/hotspot/share/oops/access.inline.hpp b/src/hotspot/share/oops/access.inline.hpp index 5fc6c82..6026103 100644 --- a/src/hotspot/share/oops/access.inline.hpp +++ b/src/hotspot/share/oops/access.inline.hpp @@ -25,7 +25,7 @@ #ifndef SHARE_VM_RUNTIME_ACCESS_INLINE_HPP #define SHARE_VM_RUNTIME_ACCESS_INLINE_HPP -#include "gc/shared/barrierSet.inline.hpp" +#include "gc/shared/barrierSetConfig.inline.hpp" #include "metaprogramming/conditional.hpp" #include "metaprogramming/isFloatingPoint.hpp" #include "metaprogramming/isIntegral.hpp"