8207200: Committed > max memory usage when getting MemoryUsage

Make sure that modification of memory usage variables are synchronized with returning them to Java.

Reviewed-by: sangheki, mchung
This commit is contained in:
Thomas Schatzl 2018-09-04 12:18:35 +02:00
parent a7d4df53fa
commit db7b4e20e1
10 changed files with 105 additions and 49 deletions

View file

@ -88,6 +88,7 @@ Monitor* DirtyCardQ_CBL_mon = NULL;
Mutex* Shared_DirtyCardQ_lock = NULL;
Mutex* MarkStackFreeList_lock = NULL;
Mutex* MarkStackChunkList_lock = NULL;
Mutex* MonitoringSupport_lock = NULL;
Mutex* ParGCRareEvent_lock = NULL;
Mutex* DerivedPointerTableGC_lock = NULL;
Monitor* CGCPhaseManager_lock = NULL;
@ -216,6 +217,8 @@ void mutex_init() {
def(MarkStackFreeList_lock , PaddedMutex , leaf , true, Monitor::_safepoint_check_never);
def(MarkStackChunkList_lock , PaddedMutex , leaf , true, Monitor::_safepoint_check_never);
def(MonitoringSupport_lock , PaddedMutex , native , true, Monitor::_safepoint_check_never); // used for serviceability monitoring support
}
def(ParGCRareEvent_lock , PaddedMutex , leaf , true, Monitor::_safepoint_check_sometimes);
def(DerivedPointerTableGC_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_never);