Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8351004

[leyden] Add test cases for cached Reference objects

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • repo-leyden
    • repo-leyden
    • hotspot

      JDK-8341587 allows Soft/Weak Reference objects to be stored in the AOT cache in the leyden/premain branch. Currently Soft/Weak references are used only for supporting method handles. However, we need to make sure that the support for cached Reference is correctly implemented:

      [1] When we add other types of objects to the AOT cache that use Reference objects (e.g., JDK-8351005 "Revert back to SoftReference for Class::reflectionData"), they work as expected.

      [2] The cached Reference objects used by the method handles implementation (such as those used by MethodType.internTable) should not be unnecessarily coupled with unrelated Reference (e.g., via the Reference::link field due to ReferenceQueue or Finalizer operations). Otherwise, this could cause unrelated objects to be unintentionally stored in the AOT cache.

      [3] java.lang.ref.Cleaner should work as expected during both the AOT assembly phase and production run.

      [4] Finalization should work as expected during both the AOT assembly phase and production run.

      This RFE adds a mechanism to test the behavior of Reference in the AOT cache so that we can determine if the current support for Reference objects in Leyden is good enough for upstreaming to the mainline.

      (Note: this RFE may not test everything as listed above. Some additional test cases may be added by a subsequent REF).

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: