equal
deleted
inserted
replaced
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 } |