Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8225882 | 14 | Patricio Chilano Mateo | P4 | Resolved | Fixed | team |
In vmThread.cpp we have the following code:
bool ok = _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;
}
but VMOperationQueue::add(VM_Operation *op) always returns true:
bool VMOperationQueue::add(VM_Operation *op) {
HOTSPOT_VMOPS_REQUEST(
(char *) op->name(), strlen(op->name()),
op->evaluation_mode());
// 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;
}
bool ok = _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;
}
but VMOperationQueue::add(VM_Operation *op) always returns true:
bool VMOperationQueue::add(VM_Operation *op) {
HOTSPOT_VMOPS_REQUEST(
(char *) op->name(), strlen(op->name()),
op->evaluation_mode());
// 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;
}
- backported by
-
JDK-8225882 Dead code due to VMOperationQueue::add() always returning true
- Resolved