RFR: 8280767: -XX:ArchiveClassesAtExit does not archive BoundMethodHandle$Species classes [v2]

Ioi Lam iklam at openjdk.java.net
Fri Feb 4 06:56:06 UTC 2022


On Thu, 3 Feb 2022 22:26:57 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> Hi, Please review
>> 
>>   When do dynamic dump, the call to LambdaForInvolkers::append_filtered for generating lambda holder classes will only allow the result which matches the filtering list to be added . This filters out the SPECIES method handle holder classes, and they won't be archived in dynamic shared archive. The patch is doing followings:
>>   1) Removed the call to  LambdaForInvolkers::append_filtered, instead just call LambdaForInvolkers::append so the SPECIES can be added to the regeneration list.
>>   2) Added an enum for  shared flag in Klass, _generated to indicate the class is regenerated and it should not be loaded from CDS if CFLH is enabled. If the class is a SPECIES and also loaded from base archive, skip regenerating it for dynamic archive.
>>   3) If CFLH is enabled, for regenerated classes, avoid calling CFLH.
>> 
>> Tests: tier1,tier4
>> 
>> Thanks
>> Yumin
>
> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Avoid call CFLH for regenerated lambda holder classes, reversed change for is_hidden_lambda_proxy

LGTM. A small nit on the comments.

src/hotspot/share/classfile/systemDictionaryShared.cpp line 1418:

> 1416:     assert(!record->_klass->is_hidden(), "hidden class cannot be looked up by name");
> 1417:     assert(check_alignment(record->_klass), "Address not aligned");
> 1418:     // The regenerated lamdbda Holder classes are not saved, should avoid call CFLH

I think it will be clear to say

// We did not save the classfile data of the regenerated LambdaForm invoker classes,
// so we cannot support CLFH for such classes.

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

Marked as reviewed by iklam (Reviewer).

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


More information about the hotspot-runtime-dev mailing list