--- a/src/hotspot/share/memory/metaspace.cpp Thu Apr 25 05:54:54 2019 -0700
+++ b/src/hotspot/share/memory/metaspace.cpp Thu Apr 25 10:56:31 2019 -0400
@@ -841,7 +841,7 @@
// Prints an ASCII representation of the given space.
void MetaspaceUtils::print_metaspace_map(outputStream* out, Metaspace::MetadataType mdtype) {
- MutexLockerEx cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
const bool for_class = mdtype == Metaspace::ClassType ? true : false;
VirtualSpaceList* const vsl = for_class ? Metaspace::class_space_list() : Metaspace::space_list();
if (vsl != NULL) {
@@ -906,7 +906,7 @@
// Utils to check if a pointer or range is part of a committed metaspace region.
metaspace::VirtualSpaceNode* MetaspaceUtils::find_enclosing_virtual_space(const void* p) {
- MutexLockerEx cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
VirtualSpaceNode* vsn = Metaspace::space_list()->find_enclosing_space(p);
if (Metaspace::using_class_space() && vsn == NULL) {
vsn = Metaspace::class_space_list()->find_enclosing_space(p);
@@ -1402,8 +1402,8 @@
}
void Metaspace::purge() {
- MutexLockerEx cl(MetaspaceExpand_lock,
- Mutex::_no_safepoint_check_flag);
+ MutexLocker cl(MetaspaceExpand_lock,
+ Mutex::_no_safepoint_check_flag);
purge(NonClassType);
if (using_class_space()) {
purge(ClassType);
@@ -1480,7 +1480,7 @@
_class_vsm = new SpaceManager(Metaspace::ClassType, type, lock);
}
- MutexLockerEx cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
// Allocate chunk for metadata objects
initialize_first_chunk(type, Metaspace::NonClassType);
@@ -1549,7 +1549,7 @@
DEBUG_ONLY(Atomic::inc(&g_internal_statistics.num_external_deallocs));
- MutexLockerEx ml(vsm()->lock(), Mutex::_no_safepoint_check_flag);
+ MutexLocker ml(vsm()->lock(), Mutex::_no_safepoint_check_flag);
if (is_class && Metaspace::using_class_space()) {
class_vsm()->deallocate(ptr, word_size);
@@ -1589,7 +1589,7 @@
}
void ClassLoaderMetaspace::add_to_statistics(ClassLoaderMetaspaceStatistics* out) const {
- MutexLockerEx cl(lock(), Mutex::_no_safepoint_check_flag);
+ MutexLocker cl(lock(), Mutex::_no_safepoint_check_flag);
add_to_statistics_locked(out);
}
@@ -1639,7 +1639,7 @@
static void test_virtual_space_list_large_chunk() {
VirtualSpaceList* vs_list = new VirtualSpaceList(os::vm_allocation_granularity());
- MutexLockerEx cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
// A size larger than VirtualSpaceSize (256k) and add one page to make it _not_ be
// vm_allocation_granularity aligned on Windows.
size_t large_size = (size_t)(2*256*K + (os::vm_page_size()/BytesPerWord));