Skip to content

8269087: CheckSegmentedCodeCache test fails in an emulated-client VM #4540

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

mychris
Copy link
Contributor

@mychris mychris commented Jun 21, 2021


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8269087: CheckSegmentedCodeCache test fails in an emulated-client VM

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4540/head:pull/4540
$ git checkout pull/4540

Update a local copy of the PR:
$ git checkout pull/4540
$ git pull https://git.openjdk.java.net/jdk pull/4540/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4540

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4540.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 21, 2021

👋 Welcome back cgo! 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 Jun 21, 2021

@mychris 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 hotspot-compiler hotspot-compiler-dev@openjdk.org rfr Pull request is ready for review labels Jun 21, 2021
@mlbridge
Copy link

mlbridge bot commented Jun 21, 2021

Webrevs

Copy link
Contributor

@veresov veresov left a comment

Choose a reason for hiding this comment

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

Under what circumstances does the VM print "-XX:+TieredCompilation not supported in this VM" ? Is it still really possible?

@mychris
Copy link
Contributor Author

mychris commented Jun 22, 2021

After thinking a bit more about this, I guess it is irrelevant if the VM does still print the warning or not. It might if neither C1, nor C2 is compiled into it, so maybe in a zero VM?

But if I understand the test correctly, the reason for checking for this error message is, that certain checks should only be done if C2 is present, so I guess the newly added check should be enough to catch all cases.

But maybe I am misunderstanding the test, because if that is the case, then why isn't the test simply tagged as requires c2?

@mychris
Copy link
Contributor Author

mychris commented Jun 22, 2021

I changed the test to use the Platform class to check if tiered compilation is supported or not. The test case should now behave the same as it has before, but the check is more robust and works in an emulated-client as well.

Copy link
Contributor

@veresov veresov left a comment

Choose a reason for hiding this comment

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

I ran this through internal testing. All clean.

@@ -58,7 +58,7 @@ private static void verifySegmentedCodeCache(ProcessBuilder pb, boolean enabled)
out.shouldContain(NON_METHOD);
} catch (RuntimeException e) {
// Check if TieredCompilation is disabled (in a client VM)
if (!out.getOutput().contains("-XX:+TieredCompilation not supported in this VM")) {
if (Platform.isTieredSupported()) {
Copy link
Contributor

@veresov veresov Jun 23, 2021

Choose a reason for hiding this comment

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

That's probably not a complete set of conditions of when the segmented code cache is disabled. But if it solves the current issue, I think that's fine.

@openjdk
Copy link

openjdk bot commented Jun 23, 2021

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

8269087: CheckSegmentedCodeCache test fails in an emulated-client VM

Reviewed-by: iveresov, kvn

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

  • 7c31903: 8267075: jcmd VM.cds should print directory of the output files
  • e515873: 8269216: Useless initialization in com/sun/crypto/provider/PBES2Parameters.java
  • 51d9159: 8236212: CompiledMethodLoad and CompiledMethodUnload events can be posted in START phase
  • 280f2d5: 8268433: serviceability/dcmd/framework/VMVersionTest.java fails with Unable to send object throw not established PipeIO Listener Thread connection
  • f375916: 8269186: [REDO] Remove CodeCache::mark_for_evol_deoptimization() method
  • 7621fa3: 8268464: Remove dependancy of TestHttpsServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/https/ tests
  • f3ba269: 8256306: ObjectMonitor::_contentions field should not be 'jint'
  • 52d5d1b: 8269188: [BACKOUT] Remove CodeCache::mark_for_evol_deoptimization() method
  • f2e690e: 8268720: Unspecified checks on NameAndType constants should not be performed
  • 2c29d79: 8269206: A small typo in comment in test/lib/sun/hotspot/WhiteBox.java
  • ... and 35 more: https://git.openjdk.java.net/jdk/compare/b7d78a5b661e2b00f271298db3b6cc873cf754e7...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 (@veresov, @vnkozlov) 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 Jun 23, 2021
@mychris
Copy link
Contributor Author

mychris commented Jun 24, 2021

Thanks for the review, Igor. Is this trivial enough or do I need a second reviewer?

@mychris
Copy link
Contributor Author

mychris commented Jun 24, 2021

Thanks for the review.
/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 24, 2021
@openjdk
Copy link

openjdk bot commented Jun 24, 2021

@mychris
Your change (at version bafae63) is now ready to be sponsored by a Committer.

@veresov
Copy link
Contributor

veresov commented Jun 24, 2021

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 24, 2021

Going to push as commit 595446b.
Since your change was applied there have been 45 commits pushed to the master branch:

  • 7c31903: 8267075: jcmd VM.cds should print directory of the output files
  • e515873: 8269216: Useless initialization in com/sun/crypto/provider/PBES2Parameters.java
  • 51d9159: 8236212: CompiledMethodLoad and CompiledMethodUnload events can be posted in START phase
  • 280f2d5: 8268433: serviceability/dcmd/framework/VMVersionTest.java fails with Unable to send object throw not established PipeIO Listener Thread connection
  • f375916: 8269186: [REDO] Remove CodeCache::mark_for_evol_deoptimization() method
  • 7621fa3: 8268464: Remove dependancy of TestHttpsServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/https/ tests
  • f3ba269: 8256306: ObjectMonitor::_contentions field should not be 'jint'
  • 52d5d1b: 8269188: [BACKOUT] Remove CodeCache::mark_for_evol_deoptimization() method
  • f2e690e: 8268720: Unspecified checks on NameAndType constants should not be performed
  • 2c29d79: 8269206: A small typo in comment in test/lib/sun/hotspot/WhiteBox.java
  • ... and 35 more: https://git.openjdk.java.net/jdk/compare/b7d78a5b661e2b00f271298db3b6cc873cf754e7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 24, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and 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 Jun 24, 2021
@openjdk
Copy link

openjdk bot commented Jun 24, 2021

@veresov @mychris Pushed as commit 595446b.

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

3 participants