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

8253118: Avoid unnecessary deopts when OSR nmethods of the same level are present. #360

Closed
wants to merge 1 commit into from

Conversation

veresov
Copy link
Contributor

@veresov veresov commented Sep 25, 2020

When running with -XX:TieredStopAtLevel={2|3} the policy tried to switch to OSR method of the same level if those are present, which caused constant deopting. The fix is to consider only higher levels for OSR switches.


Progress

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

Issue

  • JDK-8253118: Avoid unnecessary deopts when OSR nmethods of the same level are present.

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/360/head:pull/360
$ git checkout pull/360

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 25, 2020

👋 Welcome back iveresov! 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 Sep 25, 2020
@openjdk
Copy link

openjdk bot commented Sep 25, 2020

@veresov 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 (add|remove) "label" command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Sep 25, 2020
@mlbridge
Copy link

mlbridge bot commented Sep 25, 2020

Webrevs

if (max_osr_level >= expected_comp_level) { // fast check to avoid locking in a typical scenario
nmethod* osr_nm = inlinee->lookup_osr_nmethod_for(bci, expected_comp_level, false);
assert(osr_nm == NULL || osr_nm->comp_level() >= expected_comp_level, "lookup_osr_nmethod_for is broken");
if (osr_nm != NULL && osr_nm->comp_level() != comp_level) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you check '> comp_level' here? expected_comp_level could be CompLevel_simple and as result you can get our_nm with lower level than current comp_level.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No we shouldn't. That's intentional. Sometimes we have to go to the lower level (3->1 or 2->1) when the method is not compilable at level 4.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@openjdk
Copy link

openjdk bot commented Oct 1, 2020

@veresov 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 more details.

After integration, the commit message for the final commit will be:

8253118: Avoid unnecessary deopts when OSR nmethods of the same level are present.

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

  • 60ec2a5: 8253824: Revert JDK-8253089 since VS warning C4307 has been disabled
  • 90c131f: 8224225: Tokenizer improvements
  • 9670425: 8253822: Remove unused exception_address_is_unpack_entry
  • 8440279: 8180514: TestPrintMdo.java test fails with -XX:-TieredCompilation
  • 44e6820: 8253650: Cleanup: remove alignment_hint parameter from os::reserve_memory
  • ed62b01: 6646602: Spelling error in javadoc for javax.swing.tree.TreeModel
  • 87276bc: 6690021: typos in TransferHandler Javadoc
  • dd36d8c: 8253429: Error reporting should report correct state of terminated/aborted threads
  • 2d9fa9d: 8247912: Make narrowOop a scoped enum
  • 928da49: 8253739: java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java fails
  • ... and 93 more: https://git.openjdk.java.net/jdk/compare/8239b67d4f1dcbd063a78286a55aafc7c80aeb4f...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 1, 2020
@veresov
Copy link
Contributor Author

veresov commented Oct 2, 2020

/integrate

@openjdk openjdk bot closed this Oct 2, 2020
@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 labels Oct 2, 2020
@openjdk
Copy link

openjdk bot commented Oct 2, 2020

@veresov Since your change was applied there have been 107 commits pushed to the master branch:

  • 3c4e824: 8249783: Simplify DerValue and DerInputStream
  • 9230c2a: 8253747: tools/jpackage/share/AppImagePackageTest.java fails with InstalledPackageSize: 0
  • cfd41c0: 8232840: java/math/BigInteger/largeMemory/SymmetricRangeTests.java fails due to "OutOfMemoryError: Requested array size exceeds VM limit"
  • 8fda5b8: 8253904: Revert Tokenizer improvements JDK-8224225
  • 60ec2a5: 8253824: Revert JDK-8253089 since VS warning C4307 has been disabled
  • 90c131f: 8224225: Tokenizer improvements
  • 9670425: 8253822: Remove unused exception_address_is_unpack_entry
  • 8440279: 8180514: TestPrintMdo.java test fails with -XX:-TieredCompilation
  • 44e6820: 8253650: Cleanup: remove alignment_hint parameter from os::reserve_memory
  • ed62b01: 6646602: Spelling error in javadoc for javax.swing.tree.TreeModel
  • ... and 97 more: https://git.openjdk.java.net/jdk/compare/8239b67d4f1dcbd063a78286a55aafc7c80aeb4f...master

Your commit was automatically rebased without conflicts.

Pushed as commit b9505df.

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

2 participants