hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 22881 b16d7faa638d
parent 22796 bb0ea482a99e
parent 22872 b6902ee5bc8d
child 22916 582da2ed4dfa
child 22907 f978a4a64728
child 22897 77e1024a4a14
equal deleted inserted replaced
22798:175a9549fb01 22881:b16d7faa638d
  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 }