Mercurial > hg > truffle
comparison src/share/vm/runtime/thread.cpp @ 6967:d9a84e246cce
Merge
author | cjplummer |
---|---|
date | Fri, 09 Nov 2012 09:45:00 -0800 |
parents | c284cf4781f0 6cb0d32b828b |
children | 80e866b1d053 |
comparison
equal
deleted
inserted
replaced
6945:a4e1bd941ded | 6967:d9a84e246cce |
---|---|
3751 vm_exit_during_initialization(buf, NULL); | 3751 vm_exit_during_initialization(buf, NULL); |
3752 FREE_C_HEAP_ARRAY(char, buf, mtThread); | 3752 FREE_C_HEAP_ARRAY(char, buf, mtThread); |
3753 } | 3753 } |
3754 } else { | 3754 } else { |
3755 // Try to load the agent from the standard dll directory | 3755 // Try to load the agent from the standard dll directory |
3756 os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), name); | 3756 if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), |
3757 library = os::dll_load(buffer, ebuf, sizeof ebuf); | 3757 name)) { |
3758 library = os::dll_load(buffer, ebuf, sizeof ebuf); | |
3759 } | |
3758 #ifdef KERNEL | 3760 #ifdef KERNEL |
3759 // Download instrument dll | 3761 // Download instrument dll |
3760 if (library == NULL && strcmp(name, "instrument") == 0) { | 3762 if (library == NULL && strcmp(name, "instrument") == 0) { |
3761 char *props = Arguments::get_kernel_properties(); | 3763 char *props = Arguments::get_kernel_properties(); |
3762 char *home = Arguments::get_java_home(); | 3764 char *home = Arguments::get_java_home(); |
3777 library = os::dll_load(buffer, ebuf, sizeof ebuf); | 3779 library = os::dll_load(buffer, ebuf, sizeof ebuf); |
3778 } | 3780 } |
3779 #endif // KERNEL | 3781 #endif // KERNEL |
3780 if (library == NULL) { // Try the local directory | 3782 if (library == NULL) { // Try the local directory |
3781 char ns[1] = {0}; | 3783 char ns[1] = {0}; |
3782 os::dll_build_name(buffer, sizeof(buffer), ns, name); | 3784 if (os::dll_build_name(buffer, sizeof(buffer), ns, name)) { |
3783 library = os::dll_load(buffer, ebuf, sizeof ebuf); | 3785 library = os::dll_load(buffer, ebuf, sizeof ebuf); |
3786 } | |
3784 if (library == NULL) { | 3787 if (library == NULL) { |
3785 const char *sub_msg = " on the library path, with error: "; | 3788 const char *sub_msg = " on the library path, with error: "; |
3786 size_t len = strlen(msg) + strlen(name) + strlen(sub_msg) + strlen(ebuf) + 1; | 3789 size_t len = strlen(msg) + strlen(name) + strlen(sub_msg) + strlen(ebuf) + 1; |
3787 char *buf = NEW_C_HEAP_ARRAY(char, len, mtThread); | 3790 char *buf = NEW_C_HEAP_ARRAY(char, len, mtThread); |
3788 jio_snprintf(buf, len, "%s%s%s%s", msg, name, sub_msg, ebuf); | 3791 jio_snprintf(buf, len, "%s%s%s%s", msg, name, sub_msg, ebuf); |