RFR: 8255493: Support for pre-generated java.lang.invoke classes in CDS dynamic archive [v3]

Coleen Phillimore coleenp at openjdk.java.net
Tue Apr 27 14:47:38 UTC 2021


On Tue, 27 Apr 2021 04:14:05 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 incrementally with one additional commit since the last revision:
> 
>   Move read static invoker lines to LambdaFormInokers, remove unneeded check for return  NULL

I just had a couple of comments, otherwise looks ok to me but I have to confess that I don't know this code that well.

src/hotspot/share/cds/lambdaFormInvokers.cpp line 86:

> 84:   guarantee(cds_klass != NULL, "jdk/internal/misc/CDS must exist!");
> 85: 
> 86:   log_info(cds)("Total lambdaform lines %d", _lambdaform_lines->length());

Can this logging be DEBUG level instead?

src/hotspot/share/cds/lambdaFormInvokers.cpp line 125:

> 123:       log_info(cds)("Out of memory when reloading classes, quit");
> 124:       return;
> 125:     }

as_utf8_string doesn't return NULL for OOM.  If resource allocation fails in the lower levels, it'll vm_exit_out_of_memory.

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

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


More information about the hotspot-dev mailing list