< prev index next > src/hotspot/share/runtime/sharedRuntime.cpp
Print this page
#include "runtime/init.hpp"
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/jniHandles.inline.hpp"
+ #include "runtime/objectMonitor.inline.hpp"
#include "runtime/perfData.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stackWatermarkSet.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/synchronizer.hpp"
RuntimeStub* SharedRuntime::_ic_miss_blob;
RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob;
RuntimeStub* SharedRuntime::_resolve_virtual_call_blob;
RuntimeStub* SharedRuntime::_resolve_static_call_blob;
address SharedRuntime::_resolve_static_call_entry;
+ address SharedRuntime::_native_frame_resume_entry = nullptr;
DeoptimizationBlob* SharedRuntime::_deopt_blob;
SafepointBlob* SharedRuntime::_polling_page_vectors_safepoint_handler_blob;
SafepointBlob* SharedRuntime::_polling_page_safepoint_handler_blob;
SafepointBlob* SharedRuntime::_polling_page_return_handler_blob;
// would leave you with the lock held and it would never be released.
// The normal monitorenter NullPointerException is thrown without acquiring a lock
// and the model is that an exception implies the method failed.
JRT_BLOCK_NO_ASYNC
Handle h_obj(THREAD, obj);
+ ThreadOnMonitorEnter tme(current);
ObjectSynchronizer::enter(h_obj, lock, current);
assert(!HAS_PENDING_EXCEPTION, "Should have no exception here");
JRT_BLOCK_END
}
// Handles the uncommon case in locking, i.e., contention or an inflated lock.
JRT_BLOCK_ENTRY(void, SharedRuntime::complete_monitor_locking_C(oopDesc* obj, BasicLock* lock, JavaThread* current))
SharedRuntime::monitor_enter_helper(obj, lock, current);
JRT_END
+ JRT_BLOCK_ENTRY(void, SharedRuntime::resume_monitor_operation(JavaThread* current, ObjectWaiter* node))
+ assert(current == JavaThread::current(), "invariant");
+ ObjectMonitor* monitor = node->monitor();
+ assert(!monitor->is_owner(current), "invariant");
+
+ monitor->resume_operation(current, node);
+ assert(monitor->is_owner(current) || current->preempting(), "invariant");
+ JRT_END
+
void SharedRuntime::monitor_exit_helper(oopDesc* obj, BasicLock* lock, JavaThread* current) {
assert(JavaThread::current() == current, "invariant");
// Exit must be non-blocking, and therefore no exceptions can be thrown.
ExceptionMark em(current);
// The object could become unlocked through a JNI call, which we have no other checks for.
< prev index next >