-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8329418: Replace pointers to tables with offsets in relocation bitmap #19107
Conversation
👋 Welcome back matsaave! A progress list of the required criteria for merging this PR into |
@matias9927 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 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
@matias9927 The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
Address vtableInfoAddress = vtablesIndex.getAddressAt(i * addressSize); // = _index[i] | ||
Address vtableAddress = vtableInfoAddress.addOffsetTo(addressSize); // = &_index[i]->_cloned_vtable[0] | ||
long vtable_offset = vtablesIndex.getJLongAt(i * addressSize); // long offset = _index[i] | ||
System.out.printf("Offset: %x\n", vtable_offset); |
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.
Remove printf().
// ... | ||
// }; | ||
// | ||
// The following loop compues the following |
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.
Since there are lot of comments after this point, maybe the wording should instead be "The loop below...". Also, should be "computes"
@@ -65,7 +65,7 @@ public static void countProps(String[] propLines, int expectedCount, String cmdN | |||
} | |||
} | |||
if (numProps != expectedCount) { | |||
throw new RuntimeException("Wrong number of " + cmdName + " properties: " + numProps); | |||
throw new RuntimeException("Wrong number of " + cmdName + " properties: " + numProps + " Expected: " + expectedCount); |
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 think it would be good to add parenthesis around the extra output you added.
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 was an accidental leftover from debugging, I didn't intend for this to be part of the change. I should revert this since it's beyond the scope of this change.
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.
SA changes look good. Thanks for taking care of this.
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. I will suggest making some clean up to improve the readability of the existing code.
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. Just one small nit.
Thanks for the reviews @plummercj and @iklam! |
Going to push as commit a706ca4.
Your commit was automatically rebased without conflicts. |
@matias9927 Pushed as commit a706ca4. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The beginning of the RW region contains pointers to c++ vtables which are always located at a fixed offset from the shared base address at runtime. This offset can be calculated at dumptime and stored with the read-only tables at the top of the RO region. As a further improvement, all the pointers to RO tables are replaced with offsets as well.
These changes will reduce the number of pointers in the RW and RO regions and will allow for the relocation bitmap size optimizations to be more effective. Verified with tier 1-5 tests.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19107/head:pull/19107
$ git checkout pull/19107
Update a local copy of the PR:
$ git checkout pull/19107
$ git pull https://git.openjdk.org/jdk.git pull/19107/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19107
View PR using the GUI difftool:
$ git pr show -t 19107
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19107.diff
Webrev
Link to Webrev Comment