src/hotspot/share/runtime/vmThread.cpp
changeset 55128 35192d9c2b76
parent 54786 ebf733a324d4
child 55514 03468b206457
--- a/src/hotspot/share/runtime/vmThread.cpp	Tue May 28 20:12:16 2019 +0200
+++ b/src/hotspot/share/runtime/vmThread.cpp	Fri May 31 11:17:55 2019 -0400
@@ -149,7 +149,7 @@
 
 //-----------------------------------------------------------------
 // High-level interface
-bool VMOperationQueue::add(VM_Operation *op) {
+void VMOperationQueue::add(VM_Operation *op) {
 
   HOTSPOT_VMOPS_REQUEST(
                    (char *) op->name(), strlen(op->name()),
@@ -157,13 +157,7 @@
 
   // Encapsulates VM queue policy. Currently, that
   // only involves putting them on the right list
-  if (op->evaluate_at_safepoint()) {
-    queue_add_back(SafepointPriority, op);
-    return true;
-  }
-
-  queue_add_back(MediumPriority, op);
-  return true;
+  queue_add_back(op->evaluate_at_safepoint() ? SafepointPriority : MediumPriority, op);
 }
 
 VM_Operation* VMOperationQueue::remove_next() {
@@ -702,16 +696,10 @@
     {
       VMOperationQueue_lock->lock_without_safepoint_check();
       log_debug(vmthread)("Adding VM operation: %s", op->name());
-      bool ok = _vm_queue->add(op);
+      _vm_queue->add(op);
       op->set_timestamp(os::javaTimeMillis());
       VMOperationQueue_lock->notify();
       VMOperationQueue_lock->unlock();
-      // VM_Operation got skipped
-      if (!ok) {
-        assert(concurrent, "can only skip concurrent tasks");
-        if (op->is_cheap_allocated()) delete op;
-        return;
-      }
     }
 
     if (!concurrent) {