RFR: 8255493: Support for pre-generated java.lang.invoke classes in CDS dynamic archive [v11]
Yumin Qi
minqi at openjdk.java.net
Thu Apr 29 22:44:04 UTC 2021
On Thu, 29 Apr 2021 22:30:40 GMT, Yumin Qi <minqi at openjdk.org> wrote:
>> Hi, Please review
>>
>> When do dynamic dump, the pre-generated lambda form classes from java.lang.invoke are not stored in dynamic archive. The patch will regenerate the four holder classes,
>> "java.lang.invoke.Invokers$Holder",
>> "java.lang.invoke.DirectMethodHandle$Holder",
>> "java.lang.invoke.DelegatingMethodHandle$Holder",
>> "java.lang.invoke.LambdaForm$Holder"
>> which will include the versions in static archive and new loaded functions all together and stored in dynamic archive. New test case added.
>> (Minor change to PrintSharedArchiveAtExit, which the index is not consecutive)
>>
>> Tests: tier1,tier2,tier3,tier4
>>
>> Thanks
>> Yumin
>
> Yumin Qi has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:
>
> - Changed DynamicArchive::dump as static counterpart. Suppressed exceptions in LambdaFormInvokers::regenerate_holder_classes except for oom
> - Merge branch 'master' into jdk-8255493
> - Merge branch 'master' of ssh://github.com/yminqi/jdk into jdk-8255493
> - Only store four lambda invoker (which will be regenerated in dynamic dump) lines in static archive
> - Removed TRAP from regenerate_holder_classes, also correct SharedLambdaDictionaryPrinter index
> - Merge branch 'master' into jdk-8255493
> - Restore filemap.[ch]pp
> - Remove unnecessary file header including
> - Removed unused function static_archive_invokers(), add back accidentally deleted empty line
> - Changed DEBUG_ONLY to log_debug, make small changes for format, added bug tag to test
> - ... and 6 more: https://git.openjdk.java.net/jdk/compare/248598ed...0846f121
The recent version change made DynamicArchive::dump take TRAPS, same as static dump. The design of LambdaFormInvokers::regenerate_holder_classes is that if the regeneration failed, it won't affect normal classes archived. So we have tests for wrong tag or line format in classlist to make sure dump archive. I changed to handle all exceptions except for OOM (which will be processed by caller if possible for the extreme case) in the function.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3611
More information about the hotspot-dev
mailing list