32 #include "interpreter/linkResolver.hpp" |
32 #include "interpreter/linkResolver.hpp" |
33 #include "interpreter/bytecodeStream.hpp" |
33 #include "interpreter/bytecodeStream.hpp" |
34 #include "jvmci/jvmciCompilerToVM.hpp" |
34 #include "jvmci/jvmciCompilerToVM.hpp" |
35 #include "jvmci/jvmciCodeInstaller.hpp" |
35 #include "jvmci/jvmciCodeInstaller.hpp" |
36 #include "jvmci/jvmciRuntime.hpp" |
36 #include "jvmci/jvmciRuntime.hpp" |
|
37 #include "logging/log.hpp" |
|
38 #include "logging/logTag.hpp" |
37 #include "memory/oopFactory.hpp" |
39 #include "memory/oopFactory.hpp" |
38 #include "memory/universe.hpp" |
40 #include "memory/universe.hpp" |
39 #include "oops/constantPool.inline.hpp" |
41 #include "oops/constantPool.inline.hpp" |
40 #include "oops/method.inline.hpp" |
42 #include "oops/method.inline.hpp" |
41 #include "oops/typeArrayOop.inline.hpp" |
43 #include "oops/typeArrayOop.inline.hpp" |
2294 if (method->has_native_function() && entry != method->native_function()) { |
2296 if (method->has_native_function() && entry != method->native_function()) { |
2295 JVMCI_THROW_MSG_0(UnsatisfiedLinkError, err_msg("%s [cannot re-link from " PTR_FORMAT " to " PTR_FORMAT "]", |
2297 JVMCI_THROW_MSG_0(UnsatisfiedLinkError, err_msg("%s [cannot re-link from " PTR_FORMAT " to " PTR_FORMAT "]", |
2296 method->name_and_sig_as_C_string(), p2i(method->native_function()), p2i(entry))); |
2298 method->name_and_sig_as_C_string(), p2i(method->native_function()), p2i(entry))); |
2297 } |
2299 } |
2298 method->set_native_function(entry, Method::native_bind_event_is_interesting); |
2300 method->set_native_function(entry, Method::native_bind_event_is_interesting); |
2299 if (PrintJNIResolving) { |
2301 log_debug(jni, resolve)("[Dynamic-linking native method %s.%s ... JNI]", |
2300 tty->print_cr("[Dynamic-linking native method %s.%s ... JNI]", |
2302 method->method_holder()->external_name(), |
2301 method->method_holder()->external_name(), |
2303 method->name()->as_C_string()); |
2302 method->name()->as_C_string()); |
|
2303 } |
|
2304 } |
2304 } |
2305 } |
2305 } |
2306 |
2306 |
2307 JavaVM* javaVM = JVMCIEnv::get_shared_library_javavm(); |
2307 JavaVM* javaVM = JVMCIEnv::get_shared_library_javavm(); |
2308 JVMCIPrimitiveArray result = JVMCIENV->new_longArray(4, JVMCI_CHECK_NULL); |
2308 JVMCIPrimitiveArray result = JVMCIENV->new_longArray(4, JVMCI_CHECK_NULL); |