RFR: 8255493: Support for pre-generated java.lang.invoke classes in CDS dynamic archive [v2]
Yumin Qi
minqi at openjdk.java.net
Tue Apr 27 04:27:42 UTC 2021
On Mon, 26 Apr 2021 23:23:25 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> 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 four additional commits since the last revision:
>>
>> - Serialize lambdafor invokers in readonly talbe, merged with master
>> - Merge branch 'master' into jdk-8255493
>> - Merge branch 'master' of ssh://github.com/yminqi/jdk into jdk-8255493
>> - 8255493: Support for pre-generated java.lang.invoke classes in CDS dynamic archive
>
> src/hotspot/share/cds/lambdaFormInvokers.cpp line 137:
>
>> 135: // make a copy of class bytes so GC will not affect us.
>> 136: char *buf = resource_allocate_bytes(THREAD, len);
>> 137: if (buf == nullptr) {
>
> `resource_allocate_bytes(THREAD, len)` by default uses `AllocFailStrategy::EXIT_OOM`. We should explicitly pass `RETURN_NULL` instead.
>
> Also, the `resource_free_bytes` call below doesn't seem necessary. The buffer will be freed when the ResourceMark is popped.
Done.
> src/hotspot/share/cds/metaspaceShared.cpp line 1466:
>
>> 1464: LambdaFormInvokers::append_filtered(str);
>> 1465: }
>> 1466: }
>
> I think the above block should be moved into lambdaFormInvokers.cpp
Done.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3611
More information about the hotspot-dev
mailing list