--- a/src/hotspot/share/oops/instanceKlass.cpp Mon Oct 16 20:22:41 2017 +0000
+++ b/src/hotspot/share/oops/instanceKlass.cpp Mon Oct 16 22:36:06 2017 -0400
@@ -1109,16 +1109,15 @@
void InstanceKlass::mask_for(const methodHandle& method, int bci,
InterpreterOopMap* entry_for) {
// Lazily create the _oop_map_cache at first request
- // Lock-free access requires load_ptr_acquire.
- OopMapCache* oop_map_cache =
- static_cast<OopMapCache*>(OrderAccess::load_ptr_acquire(&_oop_map_cache));
+ // Lock-free access requires load_acquire.
+ OopMapCache* oop_map_cache = OrderAccess::load_acquire(&_oop_map_cache);
if (oop_map_cache == NULL) {
MutexLocker x(OopMapCacheAlloc_lock);
// Check if _oop_map_cache was allocated while we were waiting for this lock
if ((oop_map_cache = _oop_map_cache) == NULL) {
oop_map_cache = new OopMapCache();
// Ensure _oop_map_cache is stable, since it is examined without a lock
- OrderAccess::release_store_ptr(&_oop_map_cache, oop_map_cache);
+ OrderAccess::release_store(&_oop_map_cache, oop_map_cache);
}
}
// _oop_map_cache is constant after init; lookup below does its own locking.
@@ -1672,7 +1671,7 @@
// transitions from NULL to non-NULL which is safe because we use
// release_set_methods_jmethod_ids() to advertise the new cache.
// A partially constructed cache should never be seen by a racing
- // thread. We also use release_store_ptr() to save a new jmethodID
+ // thread. We also use release_store() to save a new jmethodID
// in the cache so a partially constructed jmethodID should never be
// seen either. Cache reads of existing jmethodIDs proceed without a
// lock, but cache writes of a new jmethodID requires uniqueness and
@@ -1831,7 +1830,7 @@
// The jmethodID cache can be read while unlocked so we have to
// make sure the new jmethodID is complete before installing it
// in the cache.
- OrderAccess::release_store_ptr(&jmeths[idnum+1], id);
+ OrderAccess::release_store(&jmeths[idnum+1], id);
} else {
*to_dealloc_id_p = new_id; // save new id for later delete
}