src/hotspot/share/jvmci/jvmciRuntime.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff src/hotspot/share/jvmci

src/hotspot/share/jvmci/jvmciRuntime.cpp

Print this page




 579   Handle receiverHandle(thread, receiver);
 580   // A nested ThreadsListHandle may require the Threads_lock which
 581   // requires thread_in_vm which is why this method cannot be JRT_LEAF.
 582   ThreadsListHandle tlh;
 583 
 584   JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle());
 585   if (receiverThread == NULL || (EnableThreadSMRExtraValidityChecks && !tlh.includes(receiverThread))) {
 586     // The other thread may exit during this process, which is ok so return false.
 587     return JNI_FALSE;
 588   } else {
 589     return (jint) Thread::is_interrupted(receiverThread, clear_interrupted != 0);
 590   }
 591 JRT_END
 592 
 593 JRT_ENTRY(int, JVMCIRuntime::test_deoptimize_call_int(JavaThread* thread, int value))
 594   deopt_caller();
 595   return value;
 596 JRT_END
 597 
 598 void JVMCIRuntime::force_initialization(TRAPS) {

 599   JVMCIRuntime::initialize_well_known_classes(CHECK);
 600 
 601   ResourceMark rm;
 602   TempNewSymbol getCompiler = SymbolTable::new_symbol("getCompiler", CHECK);
 603   TempNewSymbol sig = SymbolTable::new_symbol("()Ljdk/vm/ci/runtime/JVMCICompiler;", CHECK);
 604   Handle jvmciRuntime = JVMCIRuntime::get_HotSpotJVMCIRuntime(CHECK);
 605   JavaValue result(T_OBJECT);
 606   JavaCalls::call_virtual(&result, jvmciRuntime, HotSpotJVMCIRuntime::klass(), getCompiler, sig, CHECK);
 607 }
 608 
 609 // private static JVMCIRuntime JVMCI.initializeRuntime()
 610 JVM_ENTRY(jobject, JVM_GetJVMCIRuntime(JNIEnv *env, jclass c))
 611   if (!EnableJVMCI) {
 612     THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled")
 613   }
 614   JVMCIRuntime::initialize_HotSpotJVMCIRuntime(CHECK_NULL);
 615   jobject ret = JVMCIRuntime::get_HotSpotJVMCIRuntime_jobject(CHECK_NULL);
 616   return ret;
 617 JVM_END
 618 




 579   Handle receiverHandle(thread, receiver);
 580   // A nested ThreadsListHandle may require the Threads_lock which
 581   // requires thread_in_vm which is why this method cannot be JRT_LEAF.
 582   ThreadsListHandle tlh;
 583 
 584   JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle());
 585   if (receiverThread == NULL || (EnableThreadSMRExtraValidityChecks && !tlh.includes(receiverThread))) {
 586     // The other thread may exit during this process, which is ok so return false.
 587     return JNI_FALSE;
 588   } else {
 589     return (jint) Thread::is_interrupted(receiverThread, clear_interrupted != 0);
 590   }
 591 JRT_END
 592 
 593 JRT_ENTRY(int, JVMCIRuntime::test_deoptimize_call_int(JavaThread* thread, int value))
 594   deopt_caller();
 595   return value;
 596 JRT_END
 597 
 598 void JVMCIRuntime::force_initialization(TRAPS) {
 599   Arguments::set_force_init_jvmci_runtime();
 600   JVMCIRuntime::initialize_well_known_classes(CHECK);
 601 
 602   ResourceMark rm;
 603   TempNewSymbol getCompiler = SymbolTable::new_symbol("getCompiler", CHECK);
 604   TempNewSymbol sig = SymbolTable::new_symbol("()Ljdk/vm/ci/runtime/JVMCICompiler;", CHECK);
 605   Handle jvmciRuntime = JVMCIRuntime::get_HotSpotJVMCIRuntime(CHECK);
 606   JavaValue result(T_OBJECT);
 607   JavaCalls::call_virtual(&result, jvmciRuntime, HotSpotJVMCIRuntime::klass(), getCompiler, sig, CHECK);
 608 }
 609 
 610 // private static JVMCIRuntime JVMCI.initializeRuntime()
 611 JVM_ENTRY(jobject, JVM_GetJVMCIRuntime(JNIEnv *env, jclass c))
 612   if (!EnableJVMCI) {
 613     THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled")
 614   }
 615   JVMCIRuntime::initialize_HotSpotJVMCIRuntime(CHECK_NULL);
 616   jobject ret = JVMCIRuntime::get_HotSpotJVMCIRuntime_jobject(CHECK_NULL);
 617   return ret;
 618 JVM_END
 619 


src/hotspot/share/jvmci/jvmciRuntime.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File