From ec9ba5dae9271978f60546ba95a4cf2575890724 Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Fri, 6 Oct 2023 10:56:00 +0000 Subject: [PATCH] 8317660: [BACKOUT] 8269393: store/load order not preserved when handling memory pool due to weakly ordered memory architecture of aarch64 Reviewed-by: ayang --- src/hotspot/share/services/memoryPool.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/hotspot/share/services/memoryPool.cpp b/src/hotspot/share/services/memoryPool.cpp index 148a595ed4d..15210835478 100644 --- a/src/hotspot/share/services/memoryPool.cpp +++ b/src/hotspot/share/services/memoryPool.cpp @@ -178,13 +178,8 @@ CodeHeapPool::CodeHeapPool(CodeHeap* codeHeap, const char* name, bool support_us } MemoryUsage CodeHeapPool::get_memory_usage() { - size_t used; - size_t committed; - { - MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); - used = used_in_bytes(); - committed = _codeHeap->capacity(); - } + size_t used = used_in_bytes(); + size_t committed = _codeHeap->capacity(); size_t maxSize = (available_for_allocation() ? max_size() : 0); return MemoryUsage(initial_size(), used, committed, maxSize);