< prev index next >

src/hotspot/share/runtime/vmThread.cpp

Print this page

        

@@ -418,12 +418,11 @@
     VM_Operation* safepoint_ops = NULL;
     //
     // Wait for VM operation
     //
     // use no_safepoint_check to get lock without attempting to "sneak"
-    { MutexLockerEx mu_queue(VMOperationQueue_lock,
-                             Mutex::_no_safepoint_check_flag);
+    { MutexLocker mu_queue(VMOperationQueue_lock);
 
       // Look for new operation
       assert(_cur_vm_operation == NULL, "no current one should be executing");
       _cur_vm_operation = _vm_queue->remove_next();
 

@@ -447,12 +446,11 @@
           tty->print_cr("VM self-destructed");
           exit(-1);
         }
 
         if (timedout && VMThread::no_op_safepoint_needed(false)) {
-          MutexUnlockerEx mul(VMOperationQueue_lock,
-                              Mutex::_no_safepoint_check_flag);
+          MutexUnlocker mul(VMOperationQueue_lock);
           // Force a safepoint since we have not had one for at least
           // 'GuaranteedSafepointInterval' milliseconds.  This will run all
           // the clean-up processing that needs to be done regularly at a
           // safepoint
           SafepointSynchronize::begin();

@@ -519,12 +517,11 @@
           // that simply means the op will wait for the next major cycle of the
           // VMThread - just as it would if the GC thread lost the race for
           // the lock.
           if (_vm_queue->peek_at_safepoint_priority()) {
             // must hold lock while draining queue
-            MutexLockerEx mu_queue(VMOperationQueue_lock,
-                                     Mutex::_no_safepoint_check_flag);
+            MutexLocker mu_queue(VMOperationQueue_lock);
             safepoint_ops = _vm_queue->drain_at_safepoint_priority();
           } else {
             safepoint_ops = NULL;
           }
         } while(safepoint_ops != NULL);

@@ -557,12 +554,11 @@
     }
 
     //
     //  Notify (potential) waiting Java thread(s) - lock without safepoint
     //  check so that sneaking is not possible
-    { MutexLockerEx mu(VMOperationRequest_lock,
-                       Mutex::_no_safepoint_check_flag);
+    { MutexLockerEx mu(VMOperationRequest_lock);
       VMOperationRequest_lock->notify_all();
     }
 
     //
     // We want to make sure that we get to a safepoint regularly.

@@ -633,11 +629,11 @@
 
     // Add VM operation to list of waiting threads. We are guaranteed not to block while holding the
     // VMOperationQueue_lock, so we can block without a safepoint check. This allows vm operation requests
     // to be queued up during a safepoint synchronization.
     {
-      VMOperationQueue_lock->lock_without_safepoint_check();
+      VMOperationQueue_lock->lock();
       log_debug(vmthread)("Adding VM operation: %s", op->name());
       bool ok = _vm_queue->add(op);
       op->set_timestamp(os::javaTimeMillis());
       VMOperationQueue_lock->notify();
       VMOperationQueue_lock->unlock();
< prev index next >