-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8364269: Simplify code cache API by storing adapter entry offsets in blob #26532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back adinn! A progress list of the required criteria for merging this PR into |
|
@adinn This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 122 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
|
Cross-compile GHA jobs would be fixed once you pull from recent master. |
|
Testing: tier1 + runtime/cds/appcds |
|
@ashu-mehra @vnkozlov could you review this cleanup? |
|
Ah, sorry, the merge appears to have caused some issues in debug builds. Will let you know when this is ready again. |
|
@vnkozlov @ashu-mehra @shipilev Ok, problem fixed, I believe, but I'm still gob-smacked that this built, ran and passed tier1 plus cds/appcds tests on Linux/aarch64 given the failure to run the exploded image on Linux/x86 and MacOS/aarch64. The problem was with the blob layout. Adding extra fields to AdapterBlob requires propagating the adjusted blob size (i.e. header_size) up the Blob constructor chain, through BufferBlob into RuntimeBlob. Which I have now done -- previously, all subclasses were sized using sizeof(BufferBlob) as none of them had extra fields. without that fix the content_start address for the Adpater blob was being reported in the tail of the blob proper which meant that in the broken builds data fields were being treated as code and we end up in hyperspace when we first use an i2c adapter to jump to Object.init(). Yet not on Linux/aarch64? Go figure. Should be ready to review now. |
|
If the entry offsets are stored in |
I planned that originally but it doesn't work because of one special case. Method So, in this one case we have a Frankenstein handler assembled from 3 disparate entry points (+ nullptr) which are not derived from an associated adapter blob. |
That's true. I missed this special adapter handler. That special handler is a pain to accommodate. |
I think maybe in follow-up RFE ;-) |
Yeah, I can take a stab at that. |
vnkozlov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Let me test it.
shipilev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me. API got indeed simpler.
| private: | ||
| AdapterBlob(int size, CodeBuffer* cb); | ||
|
|
||
| AdapterBlob(int size, CodeBuffer* cb, int entry_offset[ENTRY_COUNT]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was today years old when I realized you can pass const-sized arrays as arguments.
ashu-mehra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
vnkozlov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My testing passed.
|
Thanks all for the reviews. Integrating now. |
|
/integrate |
|
Going to push as commit 241808e.
Your commit was automatically rebased without conflicts. |
|
Hi @adinn, We encountered runtime error on Arm32 after this patch. I filed in https://bugs.openjdk.org/browse/JDK-8365229. |
The AOT stub blob save and restore API handles Adapter blobs differently to other single-stub blobs by passing the associated entries in a separate auxiliary array. Storing the entry offsets in the blob, as happens with other generated blobs, simplifies the current save/restore API and implementation. It also makes it easier to define and implement an API extension supporting save and restore of multi-stub (StubGen) blobs.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26532/head:pull/26532$ git checkout pull/26532Update a local copy of the PR:
$ git checkout pull/26532$ git pull https://git.openjdk.org/jdk.git pull/26532/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26532View PR using the GUI difftool:
$ git pr show -t 26532Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26532.diff
Using Webrev
Link to Webrev Comment