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

8273486: Zero: Handle DiagnoseSyncOnValueBasedClasses VM option #5412

Closed

Conversation

@shipilev
Copy link
Contributor

@shipilev shipilev commented Sep 8, 2021

JDK-8257027 added a diagnostic option to check for synchronization on value-based classes. Zero does not support it, so it would fail the relevant test:

$ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/Monitor/SyncOnValueBasedClassTest.java

STDERR:
 stdout: [];
 stderr: [Exception in thread "main" java.lang.RuntimeException: synchronization on value based class did not fail
	at SyncOnValueBasedClassTest$FatalTest.main(SyncOnValueBasedClassTest.java:128)
]
 exitValue = 1

java.lang.RuntimeException: 'fatal error: Synchronizing on object' missing from stdout/stderr 

Template interpreters implement this check by going to to slowpath that calls InterpreterRuntime::monitorenter. Zero already goes to that path when UseHeavyMonitors is enabled, so we might just enable it when lock diagnostics is requested. This would cost us zero (pun intended) when diagnostic option is disabled.

Additional testing:

  • Linux x86_64 Zero, affected test now passes

Progress

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

Issue

  • JDK-8273486: Zero: Handle DiagnoseSyncOnValueBasedClasses VM option

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5412

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 8, 2021

👋 Welcome back shade! 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.

Loading

@openjdk openjdk bot added the rfr label Sep 8, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 8, 2021

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

  • hotspot

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.

Loading

@openjdk openjdk bot added the hotspot label Sep 8, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 8, 2021

Webrevs

Loading

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Sep 13, 2021

Any takers? :)

Loading

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Hi Aleksey,

Change seems fine. I'm a little surprised this is all you need.

Cheers,
David

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Sep 14, 2021

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

8273486: Zero: Handle DiagnoseSyncOnValueBasedClasses VM option

Reviewed-by: dholmes

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

  • c54a918: 8273691: Missing comma after 2021 in GraphemeTestAccessor.java copyright notice
  • 3d9dc8f: 8273430: Suspicious duplicate condition in java.util.regex.Grapheme#isExcludedSpacingMark
  • 5095068: 8273675: Remove unused Universe::_verify_in_progress flag
  • fc0f854: 8246797: A convenient method to read OPTIONAL element
  • 6cf5079: 8273513: Make java.io.FilterInputStream specification more precise about overrides
  • b4b1210: 8273616: Fix trivial doc typos in the java.base module
  • 7c26ddb: 8195809: [TESTBUG] jps and jcmd -l support for containers is not tested
  • 4cfa230: 8273259: Character.getName doesn't follow Unicode spec for ideographs
  • f9b2507: 8271834: TestStringDeduplicationAgeThreshold intermittent failures on Shenandoah
  • 261cb44: 8273629: compiler/uncommontrap/TestDeoptOOM.java fails with release VMs
  • ... and 84 more: https://git.openjdk.java.net/jdk/compare/3cd95a2932ab6a2cb39322354f7ad181de8bfc9e...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.

Loading

@openjdk openjdk bot added the ready label Sep 14, 2021
@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Sep 14, 2021

Change seems fine. I'm a little surprised this is all you need.

Thanks. Yes, the magic of reusing the existing UseHeavyMonitors paths. It would be a minor problem if we ever decide to ditch that option, but that's the issue for another day.

/integrate

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Sep 14, 2021

Going to push as commit 86a8e55.
Since your change was applied there have been 95 commits pushed to the master branch:

  • 8d73ee6: 8273471: Add foldmultilines to UL for stdout/err
  • c54a918: 8273691: Missing comma after 2021 in GraphemeTestAccessor.java copyright notice
  • 3d9dc8f: 8273430: Suspicious duplicate condition in java.util.regex.Grapheme#isExcludedSpacingMark
  • 5095068: 8273675: Remove unused Universe::_verify_in_progress flag
  • fc0f854: 8246797: A convenient method to read OPTIONAL element
  • 6cf5079: 8273513: Make java.io.FilterInputStream specification more precise about overrides
  • b4b1210: 8273616: Fix trivial doc typos in the java.base module
  • 7c26ddb: 8195809: [TESTBUG] jps and jcmd -l support for containers is not tested
  • 4cfa230: 8273259: Character.getName doesn't follow Unicode spec for ideographs
  • f9b2507: 8271834: TestStringDeduplicationAgeThreshold intermittent failures on Shenandoah
  • ... and 85 more: https://git.openjdk.java.net/jdk/compare/3cd95a2932ab6a2cb39322354f7ad181de8bfc9e...master

Your commit was automatically rebased without conflicts.

Loading

@openjdk openjdk bot closed this Sep 14, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Sep 14, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 14, 2021

@shipilev Pushed as commit 86a8e55.

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

Loading

@shipilev shipilev deleted the JDK-8273486-zero-diag-synconvalue branch Sep 14, 2021
Copy link
Member

@tstuefe tstuefe left a comment

LGTM

Loading

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