-
Notifications
You must be signed in to change notification settings - Fork 143
8371357: [lworld] Remove EnableValhalla #1759
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 phubner! A progress list of the required criteria for merging this PR into |
|
@Arraying 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 4 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 |
a44154d to
d671584
Compare
|
@Arraying this pull request can not be integrated into git checkout JDK-8371357
git fetch https://git.openjdk.org/valhalla.git lworld
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge lworld"
git push |
75f5532 to
fb5641a
Compare
coleenp
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.
Except for EnableValhalla legacy comments that I think should be removed, this looks reasonable on it's own. Does it pass our existing tier1-4 testing without updating problem lists ?
f5b6316 to
624b2c6
Compare
stefank
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.
Not a full review, but I think this looks good. If this is accepted you'll have to add includes of arguments.hpp to all places where you have added a call to is_valhalla_enabled().
As Ioi suggested in the mainline argument.hpp PR shouldn't this be something more specific to what is actually being enabled in this preview release e.g. valueTypesConfig.hpp which defines |
|
coleenp
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 seems fine to me with or without a one line include file for is_valhalla_enabled() to test Arguments::enable_preview() or any other change for future preview or valhalla related features. I think we can fix that for the specific situations when it happens.
stefank
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 minus one nit.
src/hotspot/share/opto/callnode.cpp
Outdated
| Node* proto_adr = phase->transform(new AddPNode(klass_node, klass_node, phase->MakeConX(in_bytes(Klass::prototype_header_offset())))); | ||
| mark_node = LoadNode::make(*phase, control, mem, proto_adr, TypeRawPtr::BOTTOM, TypeX_X, TypeX_X->basic_type(), MemNode::unordered); | ||
| if (EnableValhalla) { | ||
| // EnavleValhalla legacy |
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.
| // EnavleValhalla legacy |
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.
Good shout, I missed that thanks.
|
Thanks for the feedback, everyone. After a face-to-face discussion, we decided this shape (without explicit feature granularity or its own file) is sufficient for our current needs. Sole |
dcubed-ojdk
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.
Generally looks good. I posted one comment where I think a logical expression is backwards.
| static bool is_valhalla_preview() { | ||
| return Arguments::enable_preview() && EnableValhalla; | ||
| } | ||
|
|
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.
Does this file still need to include arguments.hpp? I'm not seeing anymore calls into Arguments::foo.
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.
Nope, I'll get rid of it.
src/hotspot/share/cds/filemap.hpp
Outdated
| bool _has_valhalla_patched_classes; // Is this archived dumped with --enable-preview -XX:+EnableValhalla? | ||
| bool _has_valhalla_patched_classes; // Is this archived dumped with --enable-preview |
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.
Nit: dropped the ? at the end of the comment.
| // Determining is the class allows tearing or not (default is not) | ||
| if (EnableValhalla && !_access_flags.is_identity_class()) { | ||
| if (Arguments::is_valhalla_enabled() && !_access_flags.is_identity_class()) { |
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.
Typo: L6147 (baseline): s/is the/if the/
| // Given a type, return true if elements of that type must be aligned to 64-bit. | ||
| static bool element_type_should_be_aligned(BasicType type) { | ||
| if (EnableValhalla && type == T_FLAT_ELEMENT) { | ||
| if (type == T_FLAT_ELEMENT) { |
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 don't need EnableValhalla or Arguments::is_valhalla_enabled() as long as all callers
of element_type_should_be_aligned() only pass known valid BasicType values. If any caller
passes a non-valid BasicType value as part of a "probing call", then a call with a value that
happens to match T_FLAT_ELEMENT by a VM with Arguments::is_valhalla_enabled() == false
will return true unexpectedly.
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 this should be fine because T_FLAT_ELEMENT is hardcoded to 15 regardless of if Valhalla/preview is enabled.
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.
Testing until tier 4 also shows no issue, so I think I'm confident enough to leave it as is. Unless someone from compiler has any insights?
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.
FWIW, a follow-up could add an assert in this branch that we are indeed running with value classes.
| // instance state | ||
| static const int age_bits = 4; | ||
| // EnableValhalla: static prototype header bits (fast path instead of klass layout_helper) | ||
| // prototype header bits (fast path instead of klass layout_helper) |
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.
Why drop the word static in the comment here?
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.
Static prototypes were part of an older model that no longer exists.
| if (!EnableValhalla || (is_interpreter_only() && !CDSConfig::is_dumping_archive() && !UseSharedSpaces)) { | ||
| if (is_valhalla_enabled() || (is_interpreter_only() && !CDSConfig::is_dumping_archive() && !UseSharedSpaces)) { |
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.
Hmmm... The original logic is !EnableValhalla so shouldn't this be: !is_valhalla_enabled()?
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're right. Good spot!
|
Now that we're not using EnableValhalla, which was in runtime/globals.hpp, there are several includes of runtime/globals.hpp which have been added over the years in the lworld branch that don't need to be added anymore. I don't see an issue with including runtime/globals.hpp unnecessarily, just pointing it out. |
Good idea. I've added it to the follow up RFE where we are doing cleanups already. |
|
I re-reviewed the changes from v02 -> v05 and they look good. |
dcubed-ojdk
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.
Thumbs up.
|
Thanks all for the diligent feedback and reviews. |
|
Going to push as commit 59a270d.
Your commit was automatically rebased without conflicts. |
Hi all,
This removes the
EnableValhallain favour of the--enable-previewflag. Concretely:EnableValhallachecks withArguments::is_valhalla_enabled().EnableValhallaflag obsolete.This greatly changes the semantics of tests. I've refined some test groups to make it easier.
Testing: tiers 1-4.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1759/head:pull/1759$ git checkout pull/1759Update a local copy of the PR:
$ git checkout pull/1759$ git pull https://git.openjdk.org/valhalla.git pull/1759/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1759View PR using the GUI difftool:
$ git pr show -t 1759Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1759.diff
Using Webrev
Link to Webrev Comment