--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp Mon Apr 29 14:34:10 2019 -0400
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp Mon Apr 29 16:01:52 2019 -0400
@@ -90,14 +90,14 @@
// If any of the classes are being redefined, wait
// Parallel constant pool merging leads to indeterminate constant pools.
void VM_RedefineClasses::lock_classes() {
- MutexLocker ml(RedefineClasses_lock);
+ MonitorLocker ml(RedefineClasses_lock);
bool has_redefined;
do {
has_redefined = false;
// Go through classes each time until none are being redefined.
for (int i = 0; i < _class_count; i++) {
if (get_ik(_class_defs[i].klass)->is_being_redefined()) {
- RedefineClasses_lock->wait();
+ ml.wait();
has_redefined = true;
break; // for loop
}
@@ -106,17 +106,17 @@
for (int i = 0; i < _class_count; i++) {
get_ik(_class_defs[i].klass)->set_is_being_redefined(true);
}
- RedefineClasses_lock->notify_all();
+ ml.notify_all();
}
void VM_RedefineClasses::unlock_classes() {
- MutexLocker ml(RedefineClasses_lock);
+ MonitorLocker ml(RedefineClasses_lock);
for (int i = 0; i < _class_count; i++) {
assert(get_ik(_class_defs[i].klass)->is_being_redefined(),
"should be being redefined to get here");
get_ik(_class_defs[i].klass)->set_is_being_redefined(false);
}
- RedefineClasses_lock->notify_all();
+ ml.notify_all();
}
bool VM_RedefineClasses::doit_prologue() {