equal
deleted
inserted
replaced
1155 if (_oop_map_cache == NULL) { |
1155 if (_oop_map_cache == NULL) { |
1156 // Otherwise, allocate a new one. |
1156 // Otherwise, allocate a new one. |
1157 MutexLocker x(OopMapCacheAlloc_lock); |
1157 MutexLocker x(OopMapCacheAlloc_lock); |
1158 // First time use. Allocate a cache in C heap |
1158 // First time use. Allocate a cache in C heap |
1159 if (_oop_map_cache == NULL) { |
1159 if (_oop_map_cache == NULL) { |
1160 _oop_map_cache = new OopMapCache(); |
1160 // Release stores from OopMapCache constructor before assignment |
|
1161 // to _oop_map_cache. C++ compilers on ppc do not emit the |
|
1162 // required memory barrier only because of the volatile |
|
1163 // qualifier of _oop_map_cache. |
|
1164 OrderAccess::release_store_ptr(&_oop_map_cache, new OopMapCache()); |
1161 } |
1165 } |
1162 } |
1166 } |
1163 // _oop_map_cache is constant after init; lookup below does is own locking. |
1167 // _oop_map_cache is constant after init; lookup below does is own locking. |
1164 _oop_map_cache->lookup(method, bci, entry_for); |
1168 _oop_map_cache->lookup(method, bci, entry_for); |
1165 } |
1169 } |