RFR: 8359120: Improve warning message when fail to load hsdis library [v2]

Taizo Kurashige tkurashige at openjdk.org
Mon Jun 30 11:11:42 UTC 2025


On Fri, 27 Jun 2025 10:17:26 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> Don't we already have such error reporting code in `Disassembler::load_library`?

Yes, that reporting code already exists, but since `nullptr` is passed at [src/hotspot/share/compiler/disassembler.hpp#L66](https://github.com/openjdk/jdk/blob/c2d76f9844aadf77a0b213a9169a7c5c8c8f1ffb/src/hotspot/share/compiler/disassembler.hpp#L66), that reporting doesn't actually work.

I thought about using this reporting code, but decided that it should not be used for the following reasons:

- If -XX:+PrintAssembly is not specified and the message `PrintAssembly defaults to abstract disassembly` is printed, the user is confused "Why do I get this message when -XX:+PrintAssembly is not specified?."
- Since the message is not always output immediately before [MachCode], but may be output slightly away, it may be difficult to associate [MachCode] with the message (It may be difficult for the user to understand why the warning was issued)
- Even if a plurality of [MachCode] are output, the message is output only once, so that it may become difficult for the user to associate [MachCode] with the message.

Thanks.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25726#issuecomment-3018739931


More information about the hotspot-compiler-dev mailing list