src/share/vm/oops/instanceKlass.cpp

changeset 6493
3205e78d8193
parent 6132
22eaa15b7960
child 6497
2da20f966936
equal deleted inserted replaced
6492:1174c8abbdb6 6493:3205e78d8193
1201 if (_oop_map_cache == NULL) { 1201 if (_oop_map_cache == NULL) {
1202 // Otherwise, allocate a new one. 1202 // Otherwise, allocate a new one.
1203 MutexLocker x(OopMapCacheAlloc_lock); 1203 MutexLocker x(OopMapCacheAlloc_lock);
1204 // First time use. Allocate a cache in C heap 1204 // First time use. Allocate a cache in C heap
1205 if (_oop_map_cache == NULL) { 1205 if (_oop_map_cache == NULL) {
1206 _oop_map_cache = new OopMapCache(); 1206 // Release stores from OopMapCache constructor before assignment
1207 // to _oop_map_cache. C++ compilers on ppc do not emit the
1208 // required memory barrier only because of the volatile
1209 // qualifier of _oop_map_cache.
1210 OrderAccess::release_store_ptr(&_oop_map_cache, new OopMapCache());
1207 } 1211 }
1208 } 1212 }
1209 // _oop_map_cache is constant after init; lookup below does is own locking. 1213 // _oop_map_cache is constant after init; lookup below does is own locking.
1210 _oop_map_cache->lookup(method, bci, entry_for); 1214 _oop_map_cache->lookup(method, bci, entry_for);
1211 } 1215 }

mercurial