RFR: 8284313: Improve warning messages when CDS archive fails to load [v2]

David Holmes dholmes at openjdk.org
Fri Aug 12 04:31:21 UTC 2022


On Thu, 11 Aug 2022 22:27:33 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Please review this change for adding more helpful messages when a CDS archive has failed to load without CDS logging being enabled.
>> 
>> e.g. warning for mismatch class paths between dump time and run time:
>> `[warning][cds] shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)`
>> 
>> warning if a timestamp of a jar file has been changed during run time:
>> `[warning][cds] app.jar timestamp has changed.`
>> 
>> Passed mach5 tiers 1,2,3 testing.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   comments from David

src/hotspot/share/cds/filemap.cpp line 467:

> 465:       if (!log_is_enabled(Info, cds)) {
> 466:         log_warning(cds)("A jar file is not the one used while building"
> 467:             " the shared archive file: %s", name);

The string literal should be factored out and reused in both places.

test/hotspot/jtreg/runtime/cds/appcds/WrongClasspath.java line 59:

> 57:     // should stil be there.
> 58:     OutputAnalyzer output = TestCommon.execAuto(
> 59:         /* "-cp", appJar, */ // <- uncomment this and the execution should succeed

Who is this comment intended for?

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

PR: https://git.openjdk.org/jdk/pull/9823


More information about the hotspot-runtime-dev mailing list