RFR: 8292269: Log more CDS failure messages in the warning channel
David Holmes
dholmes at openjdk.org
Mon Feb 6 04:54:49 UTC 2023
On Fri, 3 Feb 2023 21:02:01 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
> When -Xshare:auto is used, FileMapInfo::fail_continue() prints the diagnostic message to the Info channel instead of Warning. This was necessary in the past because CDS would failed to load for many reasons (e.g., failure to mmap due to ASLR) that are not the fault of the user. If we printed the message in the Warning channel, the user would be overwhelmed and would ultimately ignore the warnings, rendering them useless.
>
> However, currently CDS is much more reliable. For some error conditions that require user attention, we should consider changing the failure logs to use the Warning channel.
>
> Since only the "warning" and "info" channels are used, they can each have their own methods where fail_continue() defaults to the warning channel. Some messages must remain in the "info" channel as their inclusion would make the output too verbose. Verified with tier1-4 tests
src/hotspot/share/cds/filemap.cpp line 118:
> 116: }
> 117:
> 118: void FileMapInfo::fail_continue_nowarn(const char *msg, ...) {
It is better to name a method by what it does do rather than what it doesn't.
But I am finding the naming here problematic anyway as we do not always continue - the logic is basically `possibly_fail_else_log_and_continue`. Maybe the simplest thing here is to only have the variant that takes the `LogLevel` and so every callsite is explicit about whether it logs at warning or info level rather than try to accommodate warn/info into the name somehow?
-------------
PR: https://git.openjdk.org/jdk/pull/12419
More information about the hotspot-runtime-dev
mailing list