-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8310110: Shenandoah: Trace page sizes #14486
Conversation
👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into |
3c6e5f1
to
fd7ecbc
Compare
Webrevs
|
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.
The idea looks good.
I would prefer not to have a one-liner helper method, and instead inline the uses like this:
if (ShenandoahVerify) {
ReservedSpace verify_bitmap(_bitmap_size, bitmap_page_size);
+ os::trace_page_sizes_for_requested_size("Verify Bitmap", bitmap_size_orig,
+ bitmap.page_size(), bitmap_page_size,
+ bitmap.base(), bitmap.size());
if (!verify_bitmap.special()) {
Also, let's wait for #14484 to land first?
Oh, also, we try to keep the synopsis format like this: "8310110: Shenandoah: Trace page sizes" |
Okay.
Certainly. Mind reviewing #14484 ? It's very simple. |
@shipilev Thanks for reviewing. Here you go. |
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 okay to me!
I would prefer the style to be:
os::trace_page_sizes_for_requested_size("Mark Bitmap",
bitmap_size_orig, bitmap_page_size,
bitmap.base(),
bitmap.size(), bitmap.page_size());
...so that we have:
line 1: label
line 2: original size, page size
line 3: base addr
line 4: actual size, page size
Would be easier to check lines 2 and 4 match?
@tstuefe 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 109 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 |
Sure, its your code :-) I reshaped the callsites. |
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, thanks!
Please make sure Windows builds/tests pass -- I think GHA in current master should be good. I see you merged recently, so we might just wait for GHA to complete.
The newly added Shenandoah test uncovered an old bug where the Aux bitmap would not be madvised correctly for use with THP. Tracked by https://bugs.openjdk.org/browse/JDK-8310388, and I disable the test for now. |
OK, assuming we get the consensus around JDK-8310388 soon, we can wait for that to land before this test? :) |
The test still makes sense for explicit huge pages, or? |
Yes, it does. I just want to minimize churn and simplify backports :) So fewer issues to backport with fewer dependencies would be better. |
I'll remove the test from this PR. |
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.
All right, this works too.
Ping... may I have a second review? This is simple stuff. |
if (cset_rs.is_reserved()) { | ||
assert(cset_rs.base() == req_addr, "Allocated where requested: " PTR_FORMAT ", " PTR_FORMAT, p2i(cset_rs.base()), addr); | ||
_collection_set = new ShenandoahCollectionSet(this, cset_rs, sh_rs.base()); | ||
rs = &cset_rs; |
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'm probably missing something here, but doesn't cset_rs go out of scope, and rs would point to undefined stuff?
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.
:-( you are of course right. This only worked out of accident since ReservedSpace has no dtor.
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.
:-( you are of course right. This only worked out of accident since ReservedSpace has no dtor.
Could you copy-assign the object, instead?
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.
Or just null-check the resulting _collection_set
and print the message then. Don't need to mess with locals then?
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.
Okay, fixed. Copying ReservedSpace is fine, we do it in other places too. This thing is used like a value object in most places.
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 now, thanks!
Going to push as commit ef71c32.
Your commit was automatically rebased without conflicts. |
-Xlog:pagesize
now produced this printoutNote that this printout is from a machine with 1G pages and -XX:+UseLargePages; it nicely demonstrates how much memory we waste in that case on support structures; https://bugs.openjdk.org/browse/JDK-8310111 tracks that.
Also note that I reuse
os::trace_page_sizes_for_requested_size
here, which I think can be improved and made clearer (alignment is actually requested pagesize). This is tracked separately in #14484 .Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14486/head:pull/14486
$ git checkout pull/14486
Update a local copy of the PR:
$ git checkout pull/14486
$ git pull https://git.openjdk.org/jdk.git pull/14486/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14486
View PR using the GUI difftool:
$ git pr show -t 14486
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14486.diff
Webrev
Link to Webrev Comment