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

Refactor regenerated class handling in lambdaFormInvokers.cpp

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 21
    • hotspot
    • b05

      Background:

      Today we regenerate 4 classes during CDS dumping. See

      https://github.com/openjdk/jdk/blob/45eaf5edd806b1f8d5c7d037752766f1737060b9/src/hotspot/share/cds/lambdaFormInvokers.cpp#L57-L61

      static const char* filter[NUM_FILTER] = {"java.lang.invoke.Invokers$Holder",
                                               "java.lang.invoke.DirectMethodHandle$Holder",
                                               "java.lang.invoke.DelegatingMethodHandle$Holder",
                                               "java.lang.invoke.LambdaForm$Holder"};

      We maintain a table in lambdaFormInvokers.cpp to record the results. When writing the CDS archive, we skip the original versions of these classes and archive the regenerated version.

      Requirements:

      The handling of regenerated classes need to be refactored to enable future development:

      [1] Improve the API to access the regenerated classes and their methods
      [2] Allow more classes to be regenerated (not just the Lambda Form invokers)

      Details:

      In future Leyden-related RFEs, such as JDK-8293336, we will have other data structures that point to the original classes (e.g., MemberNames may point to methods in the original classes). These pointers need to be redirected to the regenerated versions.

      Also, in JDK-8288334, we need to reload a new InstanceKlass of each "old" class that has been linked.

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

              Created:
              Updated:
              Resolved: