src/share/vm/runtime/vmThread.cpp
Print this page
*** 568,578 ****
--- 568,582 ----
Thread* t = Thread::current();
if (!t->is_VM_thread()) {
SkipGCALot sgcalot(t); // avoid re-entrant attempts to gc-a-lot
// JavaThread or WatcherThread
+ bool concurrent = op->evaluate_concurrently();
+ // only blocking VM operations need to verify the caller's safepoint state:
+ if (!concurrent) {
t->check_for_valid_safepoint_state(true);
+ }
// New request from Java thread, evaluate prologue
if (!op->doit_prologue()) {
return; // op was cancelled
}
*** 580,590 ****
// Setup VM_operations for execution
op->set_calling_thread(t, Thread::get_priority(t));
// It does not make sense to execute the epilogue, if the VM operation object is getting
// deallocated by the VM thread.
- bool concurrent = op->evaluate_concurrently();
bool execute_epilog = !op->is_cheap_allocated();
assert(!concurrent || op->is_cheap_allocated(), "concurrent => cheap_allocated");
// Get ticket number for non-concurrent VM operations
int ticket = 0;
--- 584,593 ----