RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache [v7]

Ioi Lam iklam at openjdk.org
Wed Oct 16 00:00:19 UTC 2024


On Wed, 2 Oct 2024 23:08:52 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Ioi Lam 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 13 additional commits since the last revision:
>> 
>>  - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics' of /jdk3/yam/open into jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>>  - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics' of /jdk3/yam/open into jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>>  - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics' of /jdk3/yam/open into jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>>  - @liach and @cl4es comments
>>  - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics' of /jdk3/yam/open into jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>>  - @dholmes-ora review comments
>>  - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics' of /jdk3/yam/open into jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>>  - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics' of /jdk3/yam/open into jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>>  - Do not use system property to limit usage to only CDS static dumps
>>  - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics' of /jdk3/yam/open into jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>>  - ... and 3 more: https://git.openjdk.org/jdk/compare/222ada2d...1b067b7b
>
> src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java line 92:
> 
>> 90:         CUSTOMIZE_THRESHOLD = Integer.parseInt(
>> 91:                 props.getProperty("java.lang.invoke.MethodHandle.CUSTOMIZE_THRESHOLD", "127"));
>> 92:         NO_SOFT_CACHE = CDS.disableMethodHandleSoftCache();
> 
> I suggest to use `CDS.disableMethodHandleSoftCache()` as the default and allow to override the mode through a property.
> 
> 
> NO_SOFT_CACHE = Boolean.parseBoolean( 
>         props.getProperty("java.lang.invoke.MethodHandle.NO_SOFT_CACHE", 
>                                         Boolean.toString(CDS.disableMethodHandleSoftCache()));

After further offline discussion with @iwanowww, I have reverted back to the system property as suggested.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21049#discussion_r1802141804


More information about the core-libs-dev mailing list