RFR: 8276787: Improve warning messages for -XX:+RecordDynamicDumpInfo
Ioi Lam
iklam at openjdk.java.net
Tue Nov 16 00:00:40 UTC 2021
On Mon, 15 Nov 2021 22:59:44 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> [1] Fixed the error messages for the three scenarios described in the bug report. See the test SharedArchiveFileOption.java for new test cases for these messages.
>>
>> [2] The global SharedDynamicArchivePath was used for both reading and writing the dynamic archive. Now the writing part is handled by DynamicArchiveBuilder::_archive_name. This simplifies the logic in Arguments::init_shared_archive_paths() and DynamicArchive::dump_for_jcmd(). It also makes the checks in [1] easier to implement.
>>
>> Testing: running through Oracle CI tiers 1-4.
>
> src/hotspot/share/runtime/arguments.cpp line 3504:
>
>> 3502: }
>> 3503: check_unsupported_dumping_properties();
>> 3504: SharedDynamicArchivePath = os::strdup_check_oom(ArchiveClassesAtExit, mtArguments);
>
> I think it is clearer to leave this assignment alone.
> It works in your current patch because in line 3561, the `ArchiveClassesAtExit` is used instead of `SharedDynamicArchivePath`.
SharedDynamicArchivePath had two meanings before this PR:
1. the dynamic archive that will be mapped during VM start-up.
2. the dynamic archive that will be dumped.
This made the code complicated (E.g., the old version of DynamicArchive::dump() needed to call into Arguments::init_shared_archive_paths() to set it SharedDynamicArchivePath).
This PR removed the second meaning. That's why I removed line 3504. Now if ArchiveClassesAtExit is specified, SharedDynamicArchivePath will be NULL.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6383
More information about the hotspot-runtime-dev
mailing list