RFR: 8261455: Automatically generate the CDS archive if necessary [v4]

Ioi Lam iklam at openjdk.java.net
Sat Jan 8 06:25:28 UTC 2022


On Fri, 7 Jan 2022 22:13:11 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> This patch is re-coded after serial fixes related: 8275846, 8276787, 8279018 etc.
>> original description(PR 5997):
>> `----------------------------------------------------------------------------------`
>> When shared archive (dynamic archive) failed to map due to damage of the archive file, dump/run jdk version mismatch or non-existence file etc, the new patch will automatically create a new shared archive if -XX:+AutoCreateSharedArchive specified with the name based on SharedArchiveFile.
>> This is a revised patch based on the old PR: 5077 and after bug 8273152 integrated.
>> `-----------------------------------------------------------------------------------`
>> 
>> Tests: tier1,tier2,tier3,tier4
>> 
>> Thanks
>> Yumin
>
> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Make FailMapInfo ctor with full path archive name, removed redundant check for magic number

src/hotspot/share/runtime/arguments.cpp line 3569:

> 3567:             DynamicDumpSharedSpaces = true;
> 3568:             ArchiveClassesAtExit = const_cast<char *>(SharedArchiveFile);
> 3569:             SharedArchivePath = get_default_shared_archive_path();

I think we should set SharedArchiveFile=NULL here. That way, when foo.jsa doesn't exist, the two command lines are equivalent:

- java -XX:ArchiveClassesAtExit=foo.jsa ...
- java -XX:SharedArchiveFile=foo.jsa -XX:+AutoCreateSharedArchive ...

and we can revert the changes on line 3602, to make the code easier to understand.

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

PR: https://git.openjdk.java.net/jdk/pull/6920


More information about the hotspot-runtime-dev mailing list