Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/thread.cpp @ 6988:2cb439954abf
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 19 Nov 2012 15:36:13 +0100 |
parents | e522a00b91aa 80e866b1d053 |
children | 679e6584c177 |
comparison
equal
deleted
inserted
replaced
6963:dd0dd0321e2a | 6988:2cb439954abf |
---|---|
1796 if (HAS_PENDING_EXCEPTION) { | 1796 if (HAS_PENDING_EXCEPTION) { |
1797 ResourceMark rm(this); | 1797 ResourceMark rm(this); |
1798 jio_fprintf(defaultStream::error_stream(), | 1798 jio_fprintf(defaultStream::error_stream(), |
1799 "\nException: %s thrown from the UncaughtExceptionHandler" | 1799 "\nException: %s thrown from the UncaughtExceptionHandler" |
1800 " in thread \"%s\"\n", | 1800 " in thread \"%s\"\n", |
1801 Klass::cast(pending_exception()->klass())->external_name(), | 1801 pending_exception()->klass()->external_name(), |
1802 get_thread_name()); | 1802 get_thread_name()); |
1803 CLEAR_PENDING_EXCEPTION; | 1803 CLEAR_PENDING_EXCEPTION; |
1804 } | 1804 } |
1805 } | 1805 } |
1806 } | 1806 } |
3763 vm_exit_during_initialization(buf, NULL); | 3763 vm_exit_during_initialization(buf, NULL); |
3764 FREE_C_HEAP_ARRAY(char, buf, mtThread); | 3764 FREE_C_HEAP_ARRAY(char, buf, mtThread); |
3765 } | 3765 } |
3766 } else { | 3766 } else { |
3767 // Try to load the agent from the standard dll directory | 3767 // Try to load the agent from the standard dll directory |
3768 os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), name); | 3768 if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), |
3769 library = os::dll_load(buffer, ebuf, sizeof ebuf); | 3769 name)) { |
3770 library = os::dll_load(buffer, ebuf, sizeof ebuf); | |
3771 } | |
3770 #ifdef KERNEL | 3772 #ifdef KERNEL |
3771 // Download instrument dll | 3773 // Download instrument dll |
3772 if (library == NULL && strcmp(name, "instrument") == 0) { | 3774 if (library == NULL && strcmp(name, "instrument") == 0) { |
3773 char *props = Arguments::get_kernel_properties(); | 3775 char *props = Arguments::get_kernel_properties(); |
3774 char *home = Arguments::get_java_home(); | 3776 char *home = Arguments::get_java_home(); |
3789 library = os::dll_load(buffer, ebuf, sizeof ebuf); | 3791 library = os::dll_load(buffer, ebuf, sizeof ebuf); |
3790 } | 3792 } |
3791 #endif // KERNEL | 3793 #endif // KERNEL |
3792 if (library == NULL) { // Try the local directory | 3794 if (library == NULL) { // Try the local directory |
3793 char ns[1] = {0}; | 3795 char ns[1] = {0}; |
3794 os::dll_build_name(buffer, sizeof(buffer), ns, name); | 3796 if (os::dll_build_name(buffer, sizeof(buffer), ns, name)) { |
3795 library = os::dll_load(buffer, ebuf, sizeof ebuf); | 3797 library = os::dll_load(buffer, ebuf, sizeof ebuf); |
3798 } | |
3796 if (library == NULL) { | 3799 if (library == NULL) { |
3797 const char *sub_msg = " on the library path, with error: "; | 3800 const char *sub_msg = " on the library path, with error: "; |
3798 size_t len = strlen(msg) + strlen(name) + strlen(sub_msg) + strlen(ebuf) + 1; | 3801 size_t len = strlen(msg) + strlen(name) + strlen(sub_msg) + strlen(ebuf) + 1; |
3799 char *buf = NEW_C_HEAP_ARRAY(char, len, mtThread); | 3802 char *buf = NEW_C_HEAP_ARRAY(char, len, mtThread); |
3800 jio_snprintf(buf, len, "%s%s%s%s", msg, name, sub_msg, ebuf); | 3803 jio_snprintf(buf, len, "%s%s%s%s", msg, name, sub_msg, ebuf); |