8317661: [REDO] store/load order not preserved when handling memory pool due to weakly ordered memory architecture of aarch64
Reviewed-by: dholmes, aph
This commit is contained in:
parent
141dae8b76
commit
ddd071617e
@ -573,6 +573,8 @@ CodeBlob* CodeCache::allocate(int size, CodeBlobType code_blob_type, bool handle
|
||||
CompileBroker::handle_full_code_cache(orig_code_blob_type);
|
||||
}
|
||||
return nullptr;
|
||||
} else {
|
||||
OrderAccess::release(); // ensure heap expansion is visible to an asynchronous observer (e.g. CodeHeapPool::get_memory_usage())
|
||||
}
|
||||
if (PrintCodeCacheExtension) {
|
||||
ResourceMark rm;
|
||||
|
@ -179,6 +179,7 @@ CodeHeapPool::CodeHeapPool(CodeHeap* codeHeap, const char* name, bool support_us
|
||||
|
||||
MemoryUsage CodeHeapPool::get_memory_usage() {
|
||||
size_t used = used_in_bytes();
|
||||
OrderAccess::acquire(); // ensure possible cache expansion in CodeCache::allocate is seen
|
||||
size_t committed = _codeHeap->capacity();
|
||||
size_t maxSize = (available_for_allocation() ? max_size() : 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user