Skip to content

Commit 973f741

Browse files
committed
8300968: Accessorize raw oop load in DeadCounterClosure
Reviewed-by: tschatzl, stefank
1 parent 64ddf95 commit 973f741

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hotspot/share/gc/shared/oopStorageSetParState.inline.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "gc/shared/oopStorageParState.inline.hpp"
3131
#include "gc/shared/oopStorageSet.hpp"
3232
#include "memory/iterator.hpp"
33+
#include "oops/access.inline.hpp"
3334
#include "runtime/atomic.hpp"
3435
#include "utilities/debug.hpp"
3536

@@ -54,7 +55,7 @@ class DeadCounterClosure : public OopClosure {
5455

5556
virtual void do_oop(oop* p) {
5657
_cl->do_oop(p);
57-
if (Atomic::load(p) == NULL) {
58+
if (NativeAccess<ON_PHANTOM_OOP_REF | AS_NO_KEEPALIVE>::oop_load(p) == nullptr) {
5859
_num_dead++; // Count both already NULL and cleared by closure.
5960
}
6061
}

0 commit comments

Comments
 (0)