Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceKlass.cpp @ 14465:28f281e8de1d
Merge
author | kvn |
---|---|
date | Thu, 20 Feb 2014 12:20:56 -0800 |
parents | e6195383bcaf abec000618bf |
children | 016b6a289fc4 301df27023d4 fdad2932c73f |
comparison
equal
deleted
inserted
replaced
14382:805784307dca | 14465:28f281e8de1d |
---|---|
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 } |