RFR: 8287001: Add warning message when fail to load hsdis libraries
yuta
duke at openjdk.java.net
Fri May 20 05:32:50 UTC 2022
On Thu, 19 May 2022 19:29:28 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> When failing to load hsdis(Hot Spot Disassembler) library (because there is no library or hsdis.so is old and so on),
>> there is no warning message (only can see info level messages if put -Xlog:os=info).
>> This should show a warning message to tell the user that you failed to load libraries for hsdis.
>> So I put a warning message to notify this.
>>
>> e.g.
>> `
>
> Can you put the warning into `dll_load()`?
> We already print messages there with `-XX:+Vebose` (unfortunately it is available only in debug VM).
> Actually consider replacing print statements and `Verbose` check there with UL.
Hi @vnkozlov ,
I think if put warning into `Disassembler::dll_load()` ,
this would print duplicated error messages for each hsdis library as written in `Disassembler::load_library`.
// Find the disassembler shared library.
// Search for several paths derived from libjvm, in this order:
// 1. <home>/lib/<vm>/libhsdis-<arch>.so (for compatibility)
// 2. <home>/lib/<vm>/hsdis-<arch>.so
// 3. <home>/lib/hsdis-<arch>.so
// 4. hsdis-<arch>.so (using LD_LIBRARY_PATH)
Besides, message with `Verbose` check seems to check whether
the length of the path of hsdis library is beyond the defined length ( not including the case of no library, or old version).
So, it seems reasonable to put the warning message into `Disassembler::load_library` after finishing to check all patterns.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8782
More information about the hotspot-compiler-dev
mailing list