2495 if (!os::find_builtin_agent(agent_lib, on_attach_symbols, num_symbol_entries)) { |
2495 if (!os::find_builtin_agent(agent_lib, on_attach_symbols, num_symbol_entries)) { |
2496 if (is_absolute_path) { |
2496 if (is_absolute_path) { |
2497 library = os::dll_load(agent, ebuf, sizeof ebuf); |
2497 library = os::dll_load(agent, ebuf, sizeof ebuf); |
2498 } else { |
2498 } else { |
2499 // Try to load the agent from the standard dll directory |
2499 // Try to load the agent from the standard dll directory |
2500 if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), |
2500 if (os::dll_locate_lib(buffer, sizeof(buffer), Arguments::get_dll_dir(), |
2501 agent)) { |
2501 agent)) { |
2502 library = os::dll_load(buffer, ebuf, sizeof ebuf); |
2502 library = os::dll_load(buffer, ebuf, sizeof ebuf); |
2503 } |
2503 } |
2504 if (library == NULL) { |
2504 if (library == NULL) { |
2505 // not found - try local path |
2505 // not found - try OS default library path |
2506 char ns[1] = {0}; |
2506 if (os::dll_build_name(buffer, sizeof(buffer), agent)) { |
2507 if (os::dll_build_name(buffer, sizeof(buffer), ns, agent)) { |
|
2508 library = os::dll_load(buffer, ebuf, sizeof ebuf); |
2507 library = os::dll_load(buffer, ebuf, sizeof ebuf); |
2509 } |
2508 } |
2510 } |
2509 } |
2511 } |
2510 } |
2512 if (library != NULL) { |
2511 if (library != NULL) { |