< prev index next >
src/hotspot/share/runtime/jniHandles.cpp
Print this page
rev 49232 : 8199612: Replace remaining uses of G1BarrierSet::enqueue() with appropriate Access API calls
*** 24,44 ****
#include "precompiled.hpp"
#include "gc/shared/oopStorage.inline.hpp"
#include "logging/log.hpp"
#include "memory/iterator.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/jniHandles.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/thread.inline.hpp"
#include "trace/traceMacros.hpp"
#include "utilities/align.hpp"
#include "utilities/debug.hpp"
- #if INCLUDE_ALL_GCS
- #include "gc/g1/g1BarrierSet.hpp"
- #endif
OopStorage* JNIHandles::_global_handles = NULL;
OopStorage* JNIHandles::_weak_global_handles = NULL;
--- 24,42 ----
#include "precompiled.hpp"
#include "gc/shared/oopStorage.inline.hpp"
#include "logging/log.hpp"
#include "memory/iterator.hpp"
+ #include "oops/access.inline.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/jniHandles.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/thread.inline.hpp"
#include "trace/traceMacros.hpp"
#include "utilities/align.hpp"
#include "utilities/debug.hpp"
OopStorage* JNIHandles::_global_handles = NULL;
OopStorage* JNIHandles::_weak_global_handles = NULL;
*** 149,165 ****
}
oop JNIHandles::resolve_jweak(jweak handle) {
assert(handle != NULL, "precondition");
assert(is_jweak(handle), "precondition");
! oop result = jweak_ref(handle);
! #if INCLUDE_ALL_GCS
! if (result != NULL && UseG1GC) {
! G1BarrierSet::enqueue(result);
! }
! #endif // INCLUDE_ALL_GCS
! return result;
}
bool JNIHandles::is_global_weak_cleared(jweak handle) {
assert(handle != NULL, "precondition");
assert(is_jweak(handle), "not a weak handle");
--- 147,159 ----
}
oop JNIHandles::resolve_jweak(jweak handle) {
assert(handle != NULL, "precondition");
assert(is_jweak(handle), "precondition");
! char* ptr = reinterpret_cast<char*>(handle) - weak_tag_value;
! oop* oopptr = reinterpret_cast<oop*>(ptr);
! return RootAccess<ON_PHANTOM_OOP_REF>::oop_load(oopptr);
}
bool JNIHandles::is_global_weak_cleared(jweak handle) {
assert(handle != NULL, "precondition");
assert(is_jweak(handle), "not a weak handle");
< prev index next >