RFR: JDK-8288003: log events for os::dll_unload [v4]
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Fri Jun 10 14:18:09 UTC 2022
On Fri, 10 Jun 2022 07:38:03 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> Currently we only log events for os::dll_load, but not for os::dll_unload, this patch adds it. On some platforms (Linux/Windows) we can use OS APIs (e.g. dlinfo on Linux) to log the path of the unloaded shared lib.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> dll_path on Linux - add NULL check, change special output to not available
Why didn't you add NULL check to `os::dll_unload()` both os_windows and os_posix?
If NULL is passed to `os::dll_unload()` at os_windows.cpp, it would be passed to `GetModuleFileName()`, then we would get executable path.
I think we can add `assert` to the start of both `dll_load()` because NULL shouldn't be passed to them.
-------------
PR: https://git.openjdk.org/jdk/pull/9101
More information about the hotspot-runtime-dev
mailing list