< prev index next >

src/hotspot/share/runtime/vmThread.cpp

Print this page




 465 
 466         // If we are at a safepoint we will evaluate all the operations that
 467         // follow that also require a safepoint
 468         if (_cur_vm_operation != NULL &&
 469             _cur_vm_operation->evaluate_at_safepoint()) {
 470           safepoint_ops = _vm_queue->drain_at_safepoint_priority();
 471         }
 472       }
 473 
 474       if (should_terminate()) break;
 475     } // Release mu_queue_lock
 476 
 477     //
 478     // Execute VM operation
 479     //
 480     { HandleMark hm(VMThread::vm_thread());
 481 
 482       EventMark em("Executing VM operation: %s", vm_operation()->name());
 483       assert(_cur_vm_operation != NULL, "we should have found an operation to execute");
 484 
 485       // Give the VM thread an extra quantum.  Jobs tend to be bursty and this
 486       // helps the VM thread to finish up the job.
 487       // FIXME: When this is enabled and there are many threads, this can degrade
 488       // performance significantly.
 489       if( VMThreadHintNoPreempt )
 490         os::hint_no_preempt();
 491 
 492       // If we are at a safepoint we will evaluate all the operations that
 493       // follow that also require a safepoint
 494       if (_cur_vm_operation->evaluate_at_safepoint()) {
 495         log_debug(vmthread)("Evaluating safepoint VM operation: %s", _cur_vm_operation->name());
 496 
 497         _vm_queue->set_drain_list(safepoint_ops); // ensure ops can be scanned
 498 
 499         SafepointSynchronize::begin();
 500         evaluate_operation(_cur_vm_operation);
 501         // now process all queued safepoint ops, iteratively draining
 502         // the queue until there are none left
 503         do {
 504           _cur_vm_operation = safepoint_ops;
 505           if (_cur_vm_operation != NULL) {
 506             do {
 507               log_debug(vmthread)("Evaluating coalesced safepoint VM operation: %s", _cur_vm_operation->name());
 508               // evaluate_operation deletes the op object so we have
 509               // to grab the next op now
 510               VM_Operation* next = _cur_vm_operation->next();
 511               _vm_queue->set_drain_list(next);




 465 
 466         // If we are at a safepoint we will evaluate all the operations that
 467         // follow that also require a safepoint
 468         if (_cur_vm_operation != NULL &&
 469             _cur_vm_operation->evaluate_at_safepoint()) {
 470           safepoint_ops = _vm_queue->drain_at_safepoint_priority();
 471         }
 472       }
 473 
 474       if (should_terminate()) break;
 475     } // Release mu_queue_lock
 476 
 477     //
 478     // Execute VM operation
 479     //
 480     { HandleMark hm(VMThread::vm_thread());
 481 
 482       EventMark em("Executing VM operation: %s", vm_operation()->name());
 483       assert(_cur_vm_operation != NULL, "we should have found an operation to execute");
 484 







 485       // If we are at a safepoint we will evaluate all the operations that
 486       // follow that also require a safepoint
 487       if (_cur_vm_operation->evaluate_at_safepoint()) {
 488         log_debug(vmthread)("Evaluating safepoint VM operation: %s", _cur_vm_operation->name());
 489 
 490         _vm_queue->set_drain_list(safepoint_ops); // ensure ops can be scanned
 491 
 492         SafepointSynchronize::begin();
 493         evaluate_operation(_cur_vm_operation);
 494         // now process all queued safepoint ops, iteratively draining
 495         // the queue until there are none left
 496         do {
 497           _cur_vm_operation = safepoint_ops;
 498           if (_cur_vm_operation != NULL) {
 499             do {
 500               log_debug(vmthread)("Evaluating coalesced safepoint VM operation: %s", _cur_vm_operation->name());
 501               // evaluate_operation deletes the op object so we have
 502               // to grab the next op now
 503               VM_Operation* next = _cur_vm_operation->next();
 504               _vm_queue->set_drain_list(next);


< prev index next >