< prev index next >

src/hotspot/share/jvmci/jvmciRuntime.cpp

Print this page




 804 
 805   {
 806     ThreadToNativeFromVM trans(thread);
 807     env->RegisterNatives(c2vmClass, CompilerToVM::methods, CompilerToVM::methods_count());
 808   }
 809 JVM_END
 810 
 811 void JVMCIRuntime::shutdown(TRAPS) {
 812   if (_HotSpotJVMCIRuntime_instance != NULL) {
 813     _shutdown_called = true;
 814     HandleMark hm(THREAD);
 815     Handle receiver = get_HotSpotJVMCIRuntime(CHECK);
 816     JavaValue result(T_VOID);
 817     JavaCallArguments args;
 818     args.push_oop(receiver);
 819     JavaCalls::call_special(&result, receiver->klass(), vmSymbols::shutdown_method_name(), vmSymbols::void_method_signature(), &args, CHECK);
 820   }
 821 }
 822 
 823 CompLevel JVMCIRuntime::adjust_comp_level_inner(const methodHandle& method, bool is_osr, CompLevel level, JavaThread* thread) {
 824   JVMCICompiler* compiler = JVMCICompiler::instance(thread);
 825   if (compiler != NULL && compiler->is_bootstrapping()) {
 826     return level;
 827   }
 828   if (!is_HotSpotJVMCIRuntime_initialized() || !_comp_level_adjustment) {
 829     // JVMCI cannot participate in compilation scheduling until
 830     // JVMCI is initialized and indicates it wants to participate.
 831     return level;
 832   }
 833 
 834 #define CHECK_RETURN THREAD); \
 835 if (HAS_PENDING_EXCEPTION) { \
 836   Handle exception(THREAD, PENDING_EXCEPTION); \
 837   CLEAR_PENDING_EXCEPTION; \
 838 \
 839   java_lang_Throwable::java_printStackTrace(exception, THREAD); \
 840   if (HAS_PENDING_EXCEPTION) { \
 841     CLEAR_PENDING_EXCEPTION; \
 842   } \
 843   return level; \
 844 } \




 804 
 805   {
 806     ThreadToNativeFromVM trans(thread);
 807     env->RegisterNatives(c2vmClass, CompilerToVM::methods, CompilerToVM::methods_count());
 808   }
 809 JVM_END
 810 
 811 void JVMCIRuntime::shutdown(TRAPS) {
 812   if (_HotSpotJVMCIRuntime_instance != NULL) {
 813     _shutdown_called = true;
 814     HandleMark hm(THREAD);
 815     Handle receiver = get_HotSpotJVMCIRuntime(CHECK);
 816     JavaValue result(T_VOID);
 817     JavaCallArguments args;
 818     args.push_oop(receiver);
 819     JavaCalls::call_special(&result, receiver->klass(), vmSymbols::shutdown_method_name(), vmSymbols::void_method_signature(), &args, CHECK);
 820   }
 821 }
 822 
 823 CompLevel JVMCIRuntime::adjust_comp_level_inner(const methodHandle& method, bool is_osr, CompLevel level, JavaThread* thread) {
 824   JVMCICompiler* compiler = JVMCICompiler::instance(false, thread);
 825   if (compiler != NULL && compiler->is_bootstrapping()) {
 826     return level;
 827   }
 828   if (!is_HotSpotJVMCIRuntime_initialized() || !_comp_level_adjustment) {
 829     // JVMCI cannot participate in compilation scheduling until
 830     // JVMCI is initialized and indicates it wants to participate.
 831     return level;
 832   }
 833 
 834 #define CHECK_RETURN THREAD); \
 835 if (HAS_PENDING_EXCEPTION) { \
 836   Handle exception(THREAD, PENDING_EXCEPTION); \
 837   CLEAR_PENDING_EXCEPTION; \
 838 \
 839   java_lang_Throwable::java_printStackTrace(exception, THREAD); \
 840   if (HAS_PENDING_EXCEPTION) { \
 841     CLEAR_PENDING_EXCEPTION; \
 842   } \
 843   return level; \
 844 } \


< prev index next >