8293337: Store method handle intrinsics in AOT cache#20959
8293337: Store method handle intrinsics in AOT cache#20959iklam wants to merge 19 commits intoopenjdk:pr/20958from
Conversation
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
Webrevs
|
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
vnkozlov
left a comment
There was a problem hiding this comment.
Looks good to me. But I am not expert in this code.
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
|
|
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
coleenp
left a comment
There was a problem hiding this comment.
I have one question, but this is good. I've always wanted these to be shared.
| assert(created, "must be"); | ||
| } | ||
| } | ||
| #endif |
There was a problem hiding this comment.
Can you add // INCLUDE_CDS
This is called at startup time before anything so it doesn't need the locking?
There was a problem hiding this comment.
I added the INCLUDE_CDS. I also added locking (or assert safepoint). They are probably not needed now, but will make the code safer in case someone tries to move or refactor it.
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
coleenp
left a comment
There was a problem hiding this comment.
I forgot to release my comment. You could hold the lock for the duration if you want.
coleenp
left a comment
There was a problem hiding this comment.
This looks good. I've always wondered if CDS could share these.
rose00
left a comment
There was a problem hiding this comment.
Good changes. One request: Please add a comment, if there isn't one somewhere already, saying (as an order of magnitude) what is a typical size of the MH intrinsic table. That would be an estimate of the number printed by this log message:
log_info(cds)("Archived %d method handle intrinsics", len)
…-in-cds-archive-heap' into jep-483-step-05-8293337-archive-method-handle-intrinsics
|
Closing this PR as its changes have been combined into #21642. |
I have added size statistics in the combined PR It looks like this: |
This is the 5th PR for JEP 483: Ahead-of-Time Class Loading & Linking.
This PR is necessary to support JDK-8293336: AOT-linking of invokedynamic for lambda expression and string concat, which needs to store Java heap objects that have native pointers to the C++
Methodobjects returned bySystemDictionary::find_method_handle_intrinsic()These
Methodobjects are created within the JVM. They do not belong to any actual Java classes. We store all theseMethodobjects into the AOT cache, so that they can be referenced by other artifacts in the AOT cache.See here for the sequence of dependent RFEs for implementing JEP 483.
Progress
Integration blockers
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20959/head:pull/20959$ git checkout pull/20959Update a local copy of the PR:
$ git checkout pull/20959$ git pull https://git.openjdk.org/jdk.git pull/20959/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20959View PR using the GUI difftool:
$ git pr show -t 20959Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20959.diff
Webrev
Link to Webrev Comment