Mercurial > hg > truffle
comparison src/share/vm/runtime/thread.cpp @ 2211:0cd39a385a72
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@gmail.com> |
---|---|
date | Mon, 21 Feb 2011 19:17:33 +0100 |
parents | d25d4ca69222 5197f3d713a1 |
children | 0654ee04b214 |
comparison
equal
deleted
inserted
replaced
2184:5d801e6b9a80 | 2211:0cd39a385a72 |
---|---|
960 JavaValue result(T_VOID); | 960 JavaValue result(T_VOID); |
961 JavaCalls::call_static(&result, klass, vmSymbols::initializeSystemClass_name(), | 961 JavaCalls::call_static(&result, klass, vmSymbols::initializeSystemClass_name(), |
962 vmSymbols::void_method_signature(), CHECK); | 962 vmSymbols::void_method_signature(), CHECK); |
963 } | 963 } |
964 | 964 |
965 #ifdef KERNEL | |
966 static void set_jkernel_boot_classloader_hook(TRAPS) { | |
967 klassOop k = SystemDictionary::sun_jkernel_DownloadManager_klass(); | |
968 instanceKlassHandle klass (THREAD, k); | |
969 | |
970 if (k == NULL) { | |
971 // sun.jkernel.DownloadManager may not present in the JDK; just return | |
972 return; | |
973 } | |
974 | |
975 JavaValue result(T_VOID); | |
976 JavaCalls::call_static(&result, klass, vmSymbols::setBootClassLoaderHook_name(), | |
977 vmSymbols::void_method_signature(), CHECK); | |
978 } | |
979 #endif // KERNEL | |
980 | |
981 // General purpose hook into Java code, run once when the VM is initialized. | 965 // General purpose hook into Java code, run once when the VM is initialized. |
982 // The Java library method itself may be changed independently from the VM. | 966 // The Java library method itself may be changed independently from the VM. |
983 static void call_postVMInitHook(TRAPS) { | 967 static void call_postVMInitHook(TRAPS) { |
984 klassOop k = SystemDictionary::sun_misc_PostVMInitHook_klass(); | 968 klassOop k = SystemDictionary::sun_misc_PostVMInitHook_klass(); |
985 instanceKlassHandle klass (THREAD, k); | 969 instanceKlassHandle klass (THREAD, k); |
1609 vmSymbols::thread_throwable_void_signature(), | 1593 vmSymbols::thread_throwable_void_signature(), |
1610 threadObj, // Arg 1 | 1594 threadObj, // Arg 1 |
1611 uncaught_exception, // Arg 2 | 1595 uncaught_exception, // Arg 2 |
1612 THREAD); | 1596 THREAD); |
1613 } | 1597 } |
1614 CLEAR_PENDING_EXCEPTION; | 1598 if (HAS_PENDING_EXCEPTION) { |
1599 ResourceMark rm(this); | |
1600 jio_fprintf(defaultStream::error_stream(), | |
1601 "\nException: %s thrown from the UncaughtExceptionHandler" | |
1602 " in thread \"%s\"\n", | |
1603 Klass::cast(pending_exception()->klass())->external_name(), | |
1604 get_thread_name()); | |
1605 CLEAR_PENDING_EXCEPTION; | |
1606 } | |
1615 } | 1607 } |
1616 } | 1608 } |
1617 | 1609 |
1618 // Call Thread.exit(). We try 3 times in case we got another Thread.stop during | 1610 // Call Thread.exit(). We try 3 times in case we got another Thread.stop during |
1619 // the execution of the method. If that is not enough, then we don't really care. Thread.stop | 1611 // the execution of the method. If that is not enough, then we don't really care. Thread.stop |
3284 // anymore. We call vm_exit_during_initialization directly instead. | 3276 // anymore. We call vm_exit_during_initialization directly instead. |
3285 SystemDictionary::compute_java_system_loader(THREAD); | 3277 SystemDictionary::compute_java_system_loader(THREAD); |
3286 if (HAS_PENDING_EXCEPTION) { | 3278 if (HAS_PENDING_EXCEPTION) { |
3287 vm_exit_during_initialization(Handle(THREAD, PENDING_EXCEPTION)); | 3279 vm_exit_during_initialization(Handle(THREAD, PENDING_EXCEPTION)); |
3288 } | 3280 } |
3289 | |
3290 #ifdef KERNEL | |
3291 if (JDK_Version::is_gte_jdk17x_version()) { | |
3292 set_jkernel_boot_classloader_hook(THREAD); | |
3293 } | |
3294 #endif // KERNEL | |
3295 | 3281 |
3296 #ifndef SERIALGC | 3282 #ifndef SERIALGC |
3297 // Support for ConcurrentMarkSweep. This should be cleaned up | 3283 // Support for ConcurrentMarkSweep. This should be cleaned up |
3298 // and better encapsulated. The ugly nested if test would go away | 3284 // and better encapsulated. The ugly nested if test would go away |
3299 // once things are properly refactored. XXX YSR | 3285 // once things are properly refactored. XXX YSR |