src/hotspot/share/compiler/compileBroker.cpp
changeset 53417 126c5e7b97b1
parent 53406 1ffcf6074569
child 53582 881c5fbeb849
equal deleted inserted replaced
53416:9db898820f63 53417:126c5e7b97b1
  2043   // Allocate a new set of JNI handles.
  2043   // Allocate a new set of JNI handles.
  2044   push_jni_handle_block();
  2044   push_jni_handle_block();
  2045   Method* target_handle = task->method();
  2045   Method* target_handle = task->method();
  2046   int compilable = ciEnv::MethodCompilable;
  2046   int compilable = ciEnv::MethodCompilable;
  2047   const char* failure_reason = NULL;
  2047   const char* failure_reason = NULL;
       
  2048   bool failure_reason_on_C_heap = false;
  2048   const char* retry_message = NULL;
  2049   const char* retry_message = NULL;
  2049 
  2050 
  2050   int system_dictionary_modification_counter;
  2051   int system_dictionary_modification_counter;
  2051   {
  2052   {
  2052     MutexLocker locker(Compile_lock, thread);
  2053     MutexLocker locker(Compile_lock, thread);
  2069         JVMCIEnv env(task, system_dictionary_modification_counter);
  2070         JVMCIEnv env(task, system_dictionary_modification_counter);
  2070         methodHandle method(thread, target_handle);
  2071         methodHandle method(thread, target_handle);
  2071         jvmci->compile_method(method, osr_bci, &env);
  2072         jvmci->compile_method(method, osr_bci, &env);
  2072 
  2073 
  2073         failure_reason = env.failure_reason();
  2074         failure_reason = env.failure_reason();
       
  2075         failure_reason_on_C_heap = env.failure_reason_on_C_heap();
  2074         if (!env.retryable()) {
  2076         if (!env.retryable()) {
  2075           retry_message = "not retryable";
  2077           retry_message = "not retryable";
  2076           compilable = ciEnv::MethodCompilable_not_at_tier;
  2078           compilable = ciEnv::MethodCompilable_not_at_tier;
  2077         }
  2079         }
  2078     }
  2080     }
  2144   // Remove the JNI handle block after the ciEnv destructor has run in
  2146   // Remove the JNI handle block after the ciEnv destructor has run in
  2145   // the previous block.
  2147   // the previous block.
  2146   pop_jni_handle_block();
  2148   pop_jni_handle_block();
  2147 
  2149 
  2148   if (failure_reason != NULL) {
  2150   if (failure_reason != NULL) {
  2149     task->set_failure_reason(failure_reason);
  2151     task->set_failure_reason(failure_reason, failure_reason_on_C_heap);
  2150     if (_compilation_log != NULL) {
  2152     if (_compilation_log != NULL) {
  2151       _compilation_log->log_failure(thread, task, failure_reason, retry_message);
  2153       _compilation_log->log_failure(thread, task, failure_reason, retry_message);
  2152     }
  2154     }
  2153     if (PrintCompilation) {
  2155     if (PrintCompilation) {
  2154       FormatBufferResource msg = retry_message != NULL ?
  2156       FormatBufferResource msg = retry_message != NULL ?