Skip to content

Conversation

@dougxc
Copy link
Member

@dougxc dougxc commented Sep 22, 2024

This PR replaces some uses of UseJVMCICompiler with EnableJVMCI so that JVMCI code paths are taken when JVMCI is only used for non-CompilerBroker compilations.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8340576: Some JVMCI flags are inconsistent (Bug - P5)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21120/head:pull/21120
$ git checkout pull/21120

Update a local copy of the PR:
$ git checkout pull/21120
$ git pull https://git.openjdk.org/jdk.git pull/21120/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21120

View PR using the GUI difftool:
$ git pr show -t 21120

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21120.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 22, 2024

👋 Welcome back dnsimon! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 22, 2024

@dougxc 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:

8340576: Some JVMCI flags are inconsistent

Reviewed-by: never

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 50 new commits pushed to the master branch:

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 master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Sep 22, 2024

@dougxc The following labels will be automatically applied to this pull request:

  • graal
  • hotspot

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.

@openjdk openjdk bot added graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Sep 22, 2024
CHECK_NOT_SET(JVMCIHostThreads, UseJVMCICompiler)
CHECK_NOT_SET(LibJVMCICompilerThreadHidden, UseJVMCICompiler)

if ((UseJVMCICompiler || EnableJVMCI) &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't UseJVMCICompiler require EnableJVMCI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will conflict with my change b755046.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem - I'll resolve it once your PR is merged.

Copy link
Contributor

@toddjonker toddjonker Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based just off the flag docs, I think its easy to think that +EnableJVMCI is a prerequisite to enabling the other JVMCI flags, along the line of +UnlockExperimentalVMOptions. (That was for sure my newbie reading.)

Perhaps its docs (here) should be updated to say "Defaults to true if UseJVMCICompiler is true"?

TBH I can't wrap my head around what +EnableJVMCI means; these options have a few chains of "this enables that" making it hard to grok the interactions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed e26e68d to try clarify this a bit.

I know it's a little confusing and apologize. When JVMCI is no longer experimental, this should become much clearer.

@dougxc dougxc changed the title 8340576: some JVMCI flags are inconsistent 8340576: Some JVMCI flags are inconsistent Sep 23, 2024
@tzezula
Copy link
Contributor

tzezula commented Sep 23, 2024

Looks good to me.

@dougxc dougxc marked this pull request as ready for review September 24, 2024 11:51
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 24, 2024
@mlbridge
Copy link

mlbridge bot commented Sep 24, 2024

Webrevs

@toddjonker
Copy link
Contributor

Studying these recent changes led me back to #14851 which added jtreg propeties:

  • jdk.hasLibgraal: the libgraal shared library file is present
  • vm.libgraal.enabled: libgraal is used as JIT compiler

The latter now feels misleading, since libgraal can be "enabled" for use by non-CompilerBroker compilations, without being used as the JIT compiler. (I'm here b/c we're assembling a distro doing exactly that.)

Would it make sense to rename the latter, to reduce ambiguity in the tests?

@dougxc
Copy link
Member Author

dougxc commented Sep 24, 2024

Would it make sense to rename the latter, to reduce ambiguity in the tests?

Sounds reasonable to me. Maybe vm.libgraal.jit? The good news is that there are no current tests using this predicate as far as I can see.

Want to take the lead on this?

@toddjonker
Copy link
Contributor

Would it make sense to rename the latter, to reduce ambiguity in the tests?

Sounds reasonable to me. Maybe vm.libgraal.jit? The good news is that there are no current tests using this predicate as far as I can see.

Want to take the lead on this?

I like that alternative, and yes I'll work up the patch. I find myself need to fix several jtreg tests to handle this kind of configuration, so it's relevant to my goals.

@toddjonker
Copy link
Contributor

@dougxc I cut an issue https://bugs.openjdk.org/projects/JDK/issues/JDK-8340974 and posted a PR #21190

This is my first JDK issue and fix; apologies if I'm getting the process wrong. I wasn't sure if I should tag you on either (or how).

Copy link
Contributor

@tkrodriguez tkrodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice cleanup.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 26, 2024
@dougxc
Copy link
Member Author

dougxc commented Sep 26, 2024

Thanks for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Sep 26, 2024

Going to push as commit 5d062e2.
Since your change was applied there have been 50 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 26, 2024
@openjdk openjdk bot closed this Sep 26, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 26, 2024
@openjdk
Copy link

openjdk bot commented Sep 26, 2024

@dougxc Pushed as commit 5d062e2.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

5 participants