hotspot/src/share/vm/runtime/thread.cpp
changeset 47089 27050b653624
parent 46974 2c6c8846e176
child 47103 a993ec29ec75
equal deleted inserted replaced
47087:2279556f90ec 47089:27050b653624
  3923         vm_exit_during_initialization(buf, NULL);
  3923         vm_exit_during_initialization(buf, NULL);
  3924         FREE_C_HEAP_ARRAY(char, buf);
  3924         FREE_C_HEAP_ARRAY(char, buf);
  3925       }
  3925       }
  3926     } else {
  3926     } else {
  3927       // Try to load the agent from the standard dll directory
  3927       // Try to load the agent from the standard dll directory
  3928       if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(),
  3928       if (os::dll_locate_lib(buffer, sizeof(buffer), Arguments::get_dll_dir(),
  3929                              name)) {
  3929                              name)) {
  3930         library = os::dll_load(buffer, ebuf, sizeof ebuf);
  3930         library = os::dll_load(buffer, ebuf, sizeof ebuf);
  3931       }
  3931       }
  3932       if (library == NULL) { // Try the local directory
  3932       if (library == NULL) { // Try the library path directory.
  3933         char ns[1] = {0};
  3933         if (os::dll_build_name(buffer, sizeof(buffer), name)) {
  3934         if (os::dll_build_name(buffer, sizeof(buffer), ns, name)) {
       
  3935           library = os::dll_load(buffer, ebuf, sizeof ebuf);
  3934           library = os::dll_load(buffer, ebuf, sizeof ebuf);
  3936         }
  3935         }
  3937         if (library == NULL) {
  3936         if (library == NULL) {
  3938           const char *sub_msg = " on the library path, with error: ";
  3937           const char *sub_msg = " on the library path, with error: ";
  3939           size_t len = strlen(msg) + strlen(name) + strlen(sub_msg) + strlen(ebuf) + 1;
  3938           size_t len = strlen(msg) + strlen(name) + strlen(sub_msg) + strlen(ebuf) + 1;