Skip to content
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

8318455: Fix the compiler/sharedstubs/SharedTrampolineTest.java and SharedStubToInterpTest.java #16277

Conversation

lepestock
Copy link
Contributor

@lepestock lepestock commented Oct 19, 2023

A continuation of #16258.

Said tests try to control the compilers used via arguments passed to subprocesses' they create. The JDK-8314838 added support for additional forwarding of the JTReg javaoptions to the subprocesses, but broke the original arguments passing. They are now passed to the enclosing driver and simply ignored by ProcessTools.createTestJvm. As a result, proper compiler may be not chosen on subprocess start, etc. This PR fixes that.

Testing: both tests run in CI, with additional arguments (tests were ignored, as expected) and without (passed).


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-8318455: Fix the compiler/sharedstubs/SharedTrampolineTest.java and SharedStubToInterpTest.java (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16277

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 19, 2023

👋 Welcome back enikitin! 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 openjdk bot added the rfr Pull request is ready for review label Oct 19, 2023
@openjdk
Copy link

openjdk bot commented Oct 19, 2023

@lepestock 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 hotspot-compiler hotspot-compiler-dev@openjdk.org label Oct 19, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 19, 2023

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann 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.

@openjdk
Copy link

openjdk bot commented Oct 20, 2023

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

8318455: Fix the compiler/sharedstubs/SharedTrampolineTest.java and SharedStubToInterpTest.java

Reviewed-by: thartmann, shade, eastigeevich

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

  • a644670: 8318609: Upcall stubs should be smaller
  • e6f23a9: 8315024: Vector API FP reduction tests should not test for exact equality
  • fd332da: 8317289: javadoc fails with -sourcepath if module-info.java contains import statements
  • 6d3cb45: 8318591: avoid leaks in loadlib_aix.cpp reload_table()
  • cb383c0: 8318587: refresh libraries cache on AIX in print_vm_info
  • 4bfe226: 8310031: Parallel: Implement better work distribution for large object arrays in old gen
  • 08f7914: 8305753: Allow JIT compilation for -Xshare:dump
  • 728b858: 8318130: SocksSocketImpl needlessly encodes hostname for IPv6 addresses
  • eb59167: 8318691: runtime/CompressedOops/CompressedClassPointersEncodingScheme.java fails with release VMs
  • 1b15011: 8318476: Add resource consumption note to BigInteger and BigDecimal
  • ... and 9 more: https://git.openjdk.org/jdk/compare/99de9bb83ff70fe81c89751516a86a94c8f552be...master

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 (@TobiHartmann, @shipilev, @eastig) 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 ready Pull request is ready to be integrated label Oct 20, 2023
@lepestock
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Oct 20, 2023
@openjdk
Copy link

openjdk bot commented Oct 20, 2023

@lepestock
Your change (at version 7de4bf9) is now ready to be sponsored by a Committer.

@@ -49,6 +50,7 @@ public class SharedTrampolineTest {
private static void runTest(String test) throws Exception {
String testClassName = SharedTrampolineTest.class.getName() + "$" + test;
ArrayList<String> command = new ArrayList<String>();
command.add("-XX:-TieredCompilation"); // C2-compiler only
Copy link
Member

Choose a reason for hiding this comment

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

It is not quite clear to me why we should not pass args[0] here, like we do in another test fix.
Would this test ever make sense to run with different compiler, e.g. C1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Superficially, it looks like the test is optimised for C2. But let's ask @eastig for help.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with Aleksey we should use args[0]. It looks like we will need to add a test for C1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with Aleksey we should use args[0]. It looks like we will need to add a test for C1.

Got it, thank you. Fixed.

Copy link
Member

Choose a reason for hiding this comment

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

Are we adding C1 version in this PR as well, or in a separate one?

Copy link
Member

Choose a reason for hiding this comment

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

I think it is better to add a new test with a separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

Created https://bugs.openjdk.org/browse/JDK-8318681 to add tests for C1.

@openjdk
Copy link

openjdk bot commented Oct 22, 2023

@lepestock this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8318455/fix_vm_flags_in_compiler_tests/pub
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated labels Oct 22, 2023
@openjdk openjdk bot added ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Oct 23, 2023
Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

All right then! Looks fine.

Copy link
Member

@eastig eastig left a comment

Choose a reason for hiding this comment

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

lgtm

@lepestock
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Oct 23, 2023
@openjdk
Copy link

openjdk bot commented Oct 23, 2023

@lepestock
Your change (at version 7e63b46) is now ready to be sponsored by a Committer.

@TobiHartmann
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 24, 2023

Going to push as commit 4a16d11.
Since your change was applied there have been 19 commits pushed to the master branch:

  • a644670: 8318609: Upcall stubs should be smaller
  • e6f23a9: 8315024: Vector API FP reduction tests should not test for exact equality
  • fd332da: 8317289: javadoc fails with -sourcepath if module-info.java contains import statements
  • 6d3cb45: 8318591: avoid leaks in loadlib_aix.cpp reload_table()
  • cb383c0: 8318587: refresh libraries cache on AIX in print_vm_info
  • 4bfe226: 8310031: Parallel: Implement better work distribution for large object arrays in old gen
  • 08f7914: 8305753: Allow JIT compilation for -Xshare:dump
  • 728b858: 8318130: SocksSocketImpl needlessly encodes hostname for IPv6 addresses
  • eb59167: 8318691: runtime/CompressedOops/CompressedClassPointersEncodingScheme.java fails with release VMs
  • 1b15011: 8318476: Add resource consumption note to BigInteger and BigDecimal
  • ... and 9 more: https://git.openjdk.org/jdk/compare/99de9bb83ff70fe81c89751516a86a94c8f552be...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 24, 2023
@openjdk openjdk bot closed this Oct 24, 2023
@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 Oct 24, 2023
@openjdk
Copy link

openjdk bot commented Oct 24, 2023

@TobiHartmann @lepestock Pushed as commit 4a16d11.

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

5 participants