RFR: 8328630: Add logging when needed symbols in dll are missing. [v2]
Robbin Ehn
rehn at openjdk.org
Fri Mar 22 10:26:26 UTC 2024
On Thu, 21 Mar 2024 10:50:12 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> src/hotspot/os/posix/os_posix.cpp line 714:
>>
>>> 712:
>>> 713: void* os::dll_lookup(void* handle, const char* name) {
>>> 714: ::dlerror(); // Clear any previous error
>>
>> Uggghhh! It is awful that we need to do that. Now this needs to be guarded with `log_is_enabled(Debug, os)`. Otherwise we need to check for the performance hit of doing this, particularly during startup.
>
> The result are stored in per thread struct, so that method just load that thread local and check that result is NULL and returns. IMHO that's fine.
>
> If there is an error it must free it, so maybe considering all the libjsvml ~40-50 errors that must be freed ?
>
> Thinking about it, those 40-50 failed lookups are much, much, more expensive.
> So it would make more sense to fix that side.
Here is the data: Avg:187.913 ns Sum:40965 ns
Want me to add the guard? I don't mind.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18404#discussion_r1535364154
More information about the hotspot-runtime-dev
mailing list