< prev index next > src/hotspot/share/prims/whitebox.cpp
Print this page
WB_ENTRY(void, WB_RelocateNMethodFromMethod(JNIEnv* env, jobject o, jobject method, jint blob_type))
ResourceMark rm(THREAD);
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
CHECK_JNI_EXCEPTION(env);
+
+ if (!NMethodRelocation) {
+ return;
+ }
+
methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
nmethod* code = mh->code();
if (code != nullptr) {
MutexLocker ml_Compile_lock(Compile_lock);
CompiledICLocker ic_locker(code);
if (address == nullptr) {
return;
}
+ if (!NMethodRelocation) {
+ return;
+ }
+
MutexLocker ml_Compile_lock(Compile_lock);
MutexLocker ml_CompiledIC_lock(CompiledIC_lock, Mutex::_no_safepoint_check_flag);
MutexLocker ml_CodeCache_lock(CodeCache_lock, Mutex::_no_safepoint_check_flag);
// Verify that nmethod address is still valid
< prev index next >