Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/thread.cpp @ 7432:0b3d19153cc6
8001028: Improve GC option handling
Summary: If there are not enough native resources to create the ReferenceHandler or Finalizer Java threads, the VM will attempt to throw an OOME before the java.lang.Class class has been initialized. This can result in assertion failures and other crashes. Move the initialization of the java.lang.Class class to just before the initialization of the java.lang.ref.Finalizer class.
Reviewed-by: jwilhelm, dholmes, coleenp
author | johnc |
---|---|
date | Wed, 12 Dec 2012 12:07:32 -0800 |
parents | d2f8c38e543d |
children | 69627aa9ab10 |
comparison
equal
deleted
inserted
replaced
7401:4459ef2189f5 | 7432:0b3d19153cc6 |
---|---|
3525 // Set thread status to running since main thread has | 3525 // Set thread status to running since main thread has |
3526 // been started and running. | 3526 // been started and running. |
3527 java_lang_Thread::set_thread_status(thread_object, | 3527 java_lang_Thread::set_thread_status(thread_object, |
3528 java_lang_Thread::RUNNABLE); | 3528 java_lang_Thread::RUNNABLE); |
3529 | 3529 |
3530 // The VM preresolve methods to these classes. Make sure that get initialized | 3530 // The VM creates & returns objects of this class. Make sure it's initialized. |
3531 initialize_class(vmSymbols::java_lang_Class(), CHECK_0); | |
3532 | |
3533 // The VM preresolves methods to these classes. Make sure that they get initialized | |
3531 initialize_class(vmSymbols::java_lang_reflect_Method(), CHECK_0); | 3534 initialize_class(vmSymbols::java_lang_reflect_Method(), CHECK_0); |
3532 initialize_class(vmSymbols::java_lang_ref_Finalizer(), CHECK_0); | 3535 initialize_class(vmSymbols::java_lang_ref_Finalizer(), CHECK_0); |
3533 // The VM creates & returns objects of this class. Make sure it's initialized. | |
3534 initialize_class(vmSymbols::java_lang_Class(), CHECK_0); | |
3535 call_initializeSystemClass(CHECK_0); | 3536 call_initializeSystemClass(CHECK_0); |
3536 | 3537 |
3537 // get the Java runtime name after java.lang.System is initialized | 3538 // get the Java runtime name after java.lang.System is initialized |
3538 JDK_Version::set_runtime_name(get_java_runtime_name(THREAD)); | 3539 JDK_Version::set_runtime_name(get_java_runtime_name(THREAD)); |
3539 JDK_Version::set_runtime_version(get_java_runtime_version(THREAD)); | 3540 JDK_Version::set_runtime_version(get_java_runtime_version(THREAD)); |