> This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & 
> Linking](https://bugs.openjdk.org/browse/JDK-8315737).
> 
> The implementation of java.lang.invoke uses SoftReferences so that unused 
> MethodHandles, LambdaForms, etc, can be garbage collected.
> 
> However, if we want to store java.lang.invoke objects in the AOT cache 
> ([JDK-8293336](https://bugs.openjdk.org/browse/JDK-8293336), the final step 
> in JEP 493), it's difficult to cache these SoftReferences -- SoftReferences 
> in turn point to ReferenceQueues, etc, which have dependencies on the current 
> execution state (Threads, etc) which are difficult to cache.
> 
> The proposal is to add a new flag: `MethodHandleStatics.NO_SOFT_CACHE`. When 
> this flag is true, we avoid using SoftReferences, and store a direct 
> reference to the target object instead.
> 
> [JDK-8293336](https://bugs.openjdk.org/browse/JDK-8293336) stores only 
> java.lang.invoke objects that refer to classes loaded by the 
> boot/platform/app loaders. These classes are never unloaded, so it's not 
> necessary to point to them using SoftReferences.
> 
> This RFE modifies only the LambdaFormEditor and MethodTypeForm classes, as 
> that's the minimal modification required by 
> [JDK-8293336](https://bugs.openjdk.org/browse/JDK-8293336).
> 
> ---
> See [here](https://bugs.openjdk.org/browse/JDK-8315737) for the sequence of 
> dependent RFEs for implementing JEP 483.

Ioi Lam has updated the pull request incrementally with 93 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-04-8293187-support-sun-invoke-util-wrapper-in-cds-archive-heap' 
into jep-483-step-05-8293337-archive-method-handle-intrinsics
 - Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking' of 
/jdk3/yak/open into 
jep-483-step-04-8293187-support-sun-invoke-util-wrapper-in-cds-archive-heap
 - Merge branch 
'jep-483-step-02-8338018-rename-class-prelinker-to-aot-cp-resolver' into 
jep-483-step-03-8329706-implement-xx-aot-class-linking
 - Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' into 
jep-483-step-02-8338018-rename-class-prelinker-to-aot-cp-resolver
 - Merge branch 'master' of https://github.com/openjdk/jdk into 
jep-483-step-01-8338017-add-aot-command-line-aliases
 - 8340864: Remove unused lines related to vmClasses
   
   Reviewed-by: shade, kvn
 - 8340831: Simplify simple validation for class definition in 
MethodHandles.Lookup
   
   Reviewed-by: redestad
 - 8340838: Clean up MutableCallSite to use explicit release fence instead of 
AtomicInteger
   
   Reviewed-by: jrose, redestad, shade
 - 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all
   
   Reviewed-by: liach, alanb, darcy, dfuchs
 - ... and 83 more: https://git.openjdk.org/jdk/compare/b383d24b...b8187149

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/21049/files
  - new: https://git.openjdk.org/jdk/pull/21049/files/b383d24b..b8187149

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21049&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21049&range=04-05

  Stats: 12294 lines in 294 files changed: 9757 ins; 1520 del; 1017 mod
  Patch: https://git.openjdk.org/jdk/pull/21049.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21049/head:pull/21049

PR: https://git.openjdk.org/jdk/pull/21049

Reply via email to