hotspot/src/share/vm/prims/jni.cpp
changeset 18683 a6418e038255
parent 18680 6d5dc445baec
child 19546 f6b7c9e96ea3
child 19545 409c50cf1e5d
equal deleted inserted replaced
18682:694f6918ba42 18683:a6418e038255
  5136     if (event.should_commit()) {
  5136     if (event.should_commit()) {
  5137       event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
  5137       event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
  5138       event.commit();
  5138       event.commit();
  5139     }
  5139     }
  5140 
  5140 
       
  5141 #ifndef PRODUCT
       
  5142   #ifndef TARGET_OS_FAMILY_windows
       
  5143     #define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) f()
       
  5144   #endif
       
  5145 
  5141     // Check if we should compile all classes on bootclasspath
  5146     // Check if we should compile all classes on bootclasspath
  5142     NOT_PRODUCT(if (CompileTheWorld) ClassLoader::compile_the_world();)
  5147     if (CompileTheWorld) ClassLoader::compile_the_world();
  5143     NOT_PRODUCT(if (ReplayCompiles) ciReplay::replay(thread);)
  5148     if (ReplayCompiles) ciReplay::replay(thread);
       
  5149 
       
  5150     // Some platforms (like Win*) need a wrapper around these test
       
  5151     // functions in order to properly handle error conditions.
       
  5152     CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(test_error_handler);
       
  5153     CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(execute_internal_vm_tests);
       
  5154 #endif
       
  5155 
  5144     // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving.
  5156     // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving.
  5145     ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native);
  5157     ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native);
  5146   } else {
  5158   } else {
  5147     if (can_try_again) {
  5159     if (can_try_again) {
  5148       // reset safe_to_recreate_vm to 1 so that retrial would be possible
  5160       // reset safe_to_recreate_vm to 1 so that retrial would be possible
  5155     // reset vm_created last to avoid race condition. Use OrderAccess to
  5167     // reset vm_created last to avoid race condition. Use OrderAccess to
  5156     // control both compiler and architectural-based reordering.
  5168     // control both compiler and architectural-based reordering.
  5157     OrderAccess::release_store(&vm_created, 0);
  5169     OrderAccess::release_store(&vm_created, 0);
  5158   }
  5170   }
  5159 
  5171 
  5160   NOT_PRODUCT(test_error_handler(ErrorHandlerTest));
       
  5161   NOT_PRODUCT(execute_internal_vm_tests());
       
  5162   return result;
  5172   return result;
  5163 }
  5173 }
  5164 
  5174 
  5165 #ifndef USDT2
  5175 #ifndef USDT2
  5166 HS_DTRACE_PROBE_DECL3(hotspot_jni, GetCreatedJavaVMs__entry, \
  5176 HS_DTRACE_PROBE_DECL3(hotspot_jni, GetCreatedJavaVMs__entry, \