< prev index next >

src/hotspot/share/jvmci/jvmciRuntime.cpp

Print this page

 388   DEBUG_ONLY(NoHandleMark nhm);
 389   CompiledMethod* cm = NULL;
 390   address continuation = NULL;
 391   {
 392     // Enter VM mode by calling the helper
 393     ResetNoHandleMark rnhm;
 394     continuation = exception_handler_for_pc_helper(current, exception, pc, cm);
 395   }
 396   // Back in JAVA, use no oops DON'T safepoint
 397 
 398   // Now check to see if the compiled method we were called from is now deoptimized.
 399   // If so we must return to the deopt blob and deoptimize the nmethod
 400   if (cm != NULL && caller_is_deopted()) {
 401     continuation = SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
 402   }
 403 
 404   assert(continuation != NULL, "no handler found");
 405   return continuation;
 406 }
 407 
 408 JRT_BLOCK_ENTRY(void, JVMCIRuntime::monitorenter(JavaThread* current, oopDesc* obj, BasicLock* lock))
 409   SharedRuntime::monitor_enter_helper(obj, lock, current);
 410 JRT_END
 411 
 412 JRT_LEAF(void, JVMCIRuntime::monitorexit(JavaThread* current, oopDesc* obj, BasicLock* lock))
 413   assert(current->last_Java_sp(), "last_Java_sp must be set");
 414   assert(oopDesc::is_oop(obj), "invalid lock object pointer dected");
 415   SharedRuntime::monitor_exit_helper(obj, lock, current);
 416 JRT_END
 417 
 418 // Object.notify() fast path, caller does slow path
 419 JRT_LEAF(jboolean, JVMCIRuntime::object_notify(JavaThread* current, oopDesc* obj))
 420 
 421   // Very few notify/notifyAll operations find any threads on the waitset, so
 422   // the dominant fast-path is to simply return.
 423   // Relatedly, it's critical that notify/notifyAll be fast in order to
 424   // reduce lock hold times.
 425   if (!SafepointSynchronize::is_synchronizing()) {
 426     if (ObjectSynchronizer::quick_notify(obj, current, false)) {
 427       return true;
 428     }
 429   }
 430   return false; // caller must perform slow path
 431 
 432 JRT_END
 433 
 434 // Object.notifyAll() fast path, caller does slow path
 435 JRT_LEAF(jboolean, JVMCIRuntime::object_notifyAll(JavaThread* current, oopDesc* obj))

 388   DEBUG_ONLY(NoHandleMark nhm);
 389   CompiledMethod* cm = NULL;
 390   address continuation = NULL;
 391   {
 392     // Enter VM mode by calling the helper
 393     ResetNoHandleMark rnhm;
 394     continuation = exception_handler_for_pc_helper(current, exception, pc, cm);
 395   }
 396   // Back in JAVA, use no oops DON'T safepoint
 397 
 398   // Now check to see if the compiled method we were called from is now deoptimized.
 399   // If so we must return to the deopt blob and deoptimize the nmethod
 400   if (cm != NULL && caller_is_deopted()) {
 401     continuation = SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
 402   }
 403 
 404   assert(continuation != NULL, "no handler found");
 405   return continuation;
 406 }
 407 
 408 JRT_BLOCK_ENTRY(void, JVMCIRuntime::monitorenter(JavaThread* current, oopDesc* obj))
 409   SharedRuntime::monitor_enter_helper(obj, current);
 410 JRT_END
 411 
 412 JRT_LEAF(void, JVMCIRuntime::monitorexit(JavaThread* current, oopDesc* obj))
 413   assert(current->last_Java_sp(), "last_Java_sp must be set");
 414   assert(oopDesc::is_oop(obj), "invalid lock object pointer dected");
 415   SharedRuntime::monitor_exit_helper(obj, current);
 416 JRT_END
 417 
 418 // Object.notify() fast path, caller does slow path
 419 JRT_LEAF(jboolean, JVMCIRuntime::object_notify(JavaThread* current, oopDesc* obj))
 420 
 421   // Very few notify/notifyAll operations find any threads on the waitset, so
 422   // the dominant fast-path is to simply return.
 423   // Relatedly, it's critical that notify/notifyAll be fast in order to
 424   // reduce lock hold times.
 425   if (!SafepointSynchronize::is_synchronizing()) {
 426     if (ObjectSynchronizer::quick_notify(obj, current, false)) {
 427       return true;
 428     }
 429   }
 430   return false; // caller must perform slow path
 431 
 432 JRT_END
 433 
 434 // Object.notifyAll() fast path, caller does slow path
 435 JRT_LEAF(jboolean, JVMCIRuntime::object_notifyAll(JavaThread* current, oopDesc* obj))
< prev index next >