8372272: Hotspot shared lib loading - add load attempts to Events::log

Reviewed-by: lucy, azeller
This commit is contained in:
Matthias Baesken 2025-12-01 13:37:32 +00:00
parent b98114f4a2
commit d328e4e7e2
4 changed files with 8 additions and 0 deletions

View File

@ -1038,6 +1038,8 @@ static void* dll_load_library(const char *filename, int *eno, char *ebuf, int eb
dflags |= RTLD_MEMBER;
}
Events::log_dll_message(nullptr, "Attempting to load shared library %s", filename);
void* result;
const char* error_report = nullptr;
JFR_ONLY(NativeLibraryLoadEvent load_event(filename, &result);)

View File

@ -1035,6 +1035,8 @@ void *os::Bsd::dlopen_helper(const char *filename, int mode, char *ebuf, int ebu
int rtn = fegetenv(&default_fenv);
assert(rtn == 0, "fegetenv must succeed");
Events::log_dll_message(nullptr, "Attempting to load shared library %s", filename);
void* result;
JFR_ONLY(NativeLibraryLoadEvent load_event(filename, &result);)
result = ::dlopen(filename, RTLD_LAZY);

View File

@ -1875,6 +1875,8 @@ void * os::Linux::dlopen_helper(const char *filename, char *ebuf, int ebuflen) {
assert(rtn == 0, "fegetenv must succeed");
#endif // IA32
Events::log_dll_message(nullptr, "Attempting to load shared library %s", filename);
void* result;
JFR_ONLY(NativeLibraryLoadEvent load_event(filename, &result);)
result = ::dlopen(filename, RTLD_LAZY);

View File

@ -1715,6 +1715,8 @@ static int _print_module(const char* fname, address base_address,
// same architecture as Hotspot is running on
void * os::dll_load(const char *name, char *ebuf, int ebuflen) {
log_info(os)("attempting shared library load of %s", name);
Events::log_dll_message(nullptr, "Attempting to load shared library %s", name);
void* result;
JFR_ONLY(NativeLibraryLoadEvent load_event(name, &result);)
result = LoadLibrary(name);