Skip to content

8379411: Use TestFramework scenarios in 837841#30116

Closed
krk wants to merge 3 commits intoopenjdk:masterfrom
krk:use-testflags-8379411
Closed

8379411: Use TestFramework scenarios in 837841#30116
krk wants to merge 3 commits intoopenjdk:masterfrom
krk:use-testflags-8379411

Conversation

@krk
Copy link
Copy Markdown

@krk krk commented Mar 6, 2026

Use TestFramework scenarios to properly pass VM flags for VerifyIterativeGVN in MissedURShiftIAddILShiftIdeal.


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-8379411: Use TestFramework scenarios in 837841 (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30116

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Mar 6, 2026

👋 Welcome back krk! 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
Copy Markdown

openjdk bot commented Mar 6, 2026

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

8379411: Use TestFramework scenarios in 837841

Reviewed-by: qamai, dfenacci, chagedorn

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 22 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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@merykitty, @dafedafe, @chhagedorn) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Mar 6, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 6, 2026

@krk The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 6, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Mar 6, 2026

Webrevs

Copy link
Copy Markdown
Member

@merykitty merykitty left a comment

Choose a reason for hiding this comment

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

Looks good to me, you may not need a second reviewer for this. Let me run some quick test just to ensure it does not break in release somehow.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 6, 2026
Copy link
Copy Markdown
Contributor

@dafedafe dafedafe left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a couple of minor questions/nits. Thanks @krk.

TestFramework.run();
var framework = new TestFramework();
framework.addScenarios(new Scenario(0));
framework.addScenarios(new Scenario(1, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:VerifyIterativeGVN=1110"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would scenario 1 be the same as scenario 0 in prod builds?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, is there a way to collapse them in prod?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure if there is a "built-in" way but you could always check with Platform.isDebugBuild().

* @run driver ${test.main.class}
* @run driver ${test.main.class} -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:VerifyIterativeGVN=1110 -Xbatch -XX:CompileCommand=compileonly,${test.main.class}::*
* @run main ${test.main.class}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I lost a sight of what the "convention" for the IR framework is: could it be @run driver?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not so sure about the intricacies, but I think(?) run main is cheaper, because you don't need to spawn another VM, which will spawn another VM that runs the tests?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Both seem to work, is there a preferred one, what do you think @merykitty?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

(didn't see your comment before posting mine)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It can definitely be (I'm just mentioning this because I remember having read it somewhere... but I'm not sure how up-to-date that is).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Update: After asking the expert, it is advisable to run IR tests with run driver. The reason is that when you pass additional flags to the test (e.g. in higher tier), with run main the flags are received by both the driver VM and the test VM, while with run driver, only the test VM receives the additional flags, which makes it more efficient, especially when those flags are stress ones.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Mar 6, 2026
Copy link
Copy Markdown
Member

@merykitty merykitty left a comment

Choose a reason for hiding this comment

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

Test results are good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 7, 2026
Copy link
Copy Markdown
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for following up on the test!

@krk
Copy link
Copy Markdown
Author

krk commented Mar 9, 2026

/integrate

Thanks!

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 9, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 9, 2026

@krk
Your change (at version 5c57a16) is now ready to be sponsored by a Committer.

@chhagedorn
Copy link
Copy Markdown
Member

/sponsor

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 9, 2026

Going to push as commit 2fc7bdc.
Since your change was applied there have been 22 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 Mar 9, 2026
@openjdk openjdk bot closed this Mar 9, 2026
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 9, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 9, 2026

@chhagedorn @krk Pushed as commit 2fc7bdc.

💡 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

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

Development

Successfully merging this pull request may close these issues.

4 participants