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

8271293: Monitor class should use ThreadBlockInVMPreprocess #4978

Closed
wants to merge 1 commit into from

Conversation

pchilano
Copy link
Contributor

@pchilano pchilano commented Aug 3, 2021

Hi,

Please review the following small patch which changes the Monitor class to use the more appropriate ThreadBlockInVMPreprocess transition wrapper instead of ThreadBlockInVM. This allows to remove the embedded InFlightMutexRelease object from ThreadBlockInVM and to move it, along with the definition of the InFlightMutexRelease class, to mutex.cpp where they belong.

I also changed the default value of allow_suspend to false, even though more users set it to true, to make it consistent with the fact that ThreadBlockInVM doesn't process suspend requests. This avoids having to think twice when looking at a ThreadBlockInVM* object as to whether it processes suspend requests or not. Suspend requests are never processed unless explicitly allowed.

I also changed ThreadBlockInVM to be a typedef to avoid declaring a wrapper class of ThreadBlockInVMPreprocess.

Testing in mach5 tiers 1-3.

Thanks,
Patricio


Progress

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

Issue

  • JDK-8271293: Monitor class should use ThreadBlockInVMPreprocess

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4978

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 3, 2021

👋 Welcome back pchilanomate! 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 Aug 3, 2021

@pchilano The following labels will be automatically applied to this pull request:

  • hotspot
  • serviceability

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

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Aug 3, 2021
@pchilano
Copy link
Contributor Author

pchilano commented Aug 3, 2021

/label add hotspot-runtime

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Aug 3, 2021
@openjdk
Copy link

openjdk bot commented Aug 3, 2021

@pchilano
The hotspot-runtime label was successfully added.

@pchilano
Copy link
Contributor Author

pchilano commented Aug 3, 2021

/label remove hotspot

@openjdk
Copy link

openjdk bot commented Aug 3, 2021

@pchilano The label remote is not a valid label. These labels are valid:

  • serviceability
  • hotspot
  • sound
  • hotspot-compiler
  • ide-support
  • kulla
  • i18n
  • shenandoah
  • jdk
  • javadoc
  • security
  • 2d
  • swing
  • hotspot-runtime
  • jmx
  • nio
  • build
  • beans
  • core-libs
  • compiler
  • net
  • hotspot-gc
  • hotspot-jfr
  • awt

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label Aug 3, 2021
@openjdk
Copy link

openjdk bot commented Aug 3, 2021

@pchilano
The hotspot label was successfully removed.

@pchilano
Copy link
Contributor Author

pchilano commented Aug 3, 2021

/label remove serviceability

@openjdk
Copy link

openjdk bot commented Aug 3, 2021

@pchilano
The serviceability label was successfully removed.

@openjdk openjdk bot removed the serviceability serviceability-dev@openjdk.org label Aug 3, 2021
@pchilano pchilano marked this pull request as ready for review August 3, 2021 23:15
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 3, 2021
@mlbridge
Copy link

mlbridge bot commented Aug 3, 2021

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Hi Patricio,

The code cleanup/reorg looks good to me.

Thanks,
David

@openjdk
Copy link

openjdk bot commented Aug 4, 2021

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

8271293: Monitor class should use ThreadBlockInVMPreprocess

Reviewed-by: dholmes, dcubed

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

  • e2c5bfe: 8271308: (fc) FileChannel.transferTo() transfers no more than Integer.MAX_VALUE bytes in one call
  • 7234a43: 8271953: fix mis-merge in JDK-8271878
  • d7fc9e4: 8267840: Improve URLStreamHandler.parseURL()
  • 55bd52a: 8271840: Add simple Integer.toString microbenchmarks
  • 18dd4d4: 8271121: ZGC: stack overflow (segv) when -Xlog:gc+start=debug
  • 685fc3c: 8270903: sun.net.httpserver.HttpConnection: Improve toString
  • 4abe531: 8271722: [TESTBUG] gc/g1/TestMixedGCLiveThreshold.java can fail if G1 Full GC uses >1 workers
  • ea9a595: 8270058: Use Objects.check{Index,FromIndexSize} for java.desktop
  • 64d18d4: 4819544: SwingSet2 JTable Demo throws NullPointerException
  • 6c8441f: 8271878: UnProblemList jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java in JDK18
  • ... and 55 more: https://git.openjdk.java.net/jdk/compare/249d641889c6f9aed6957502d5fca9c74c9baceb...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 Aug 4, 2021
@pchilano
Copy link
Contributor Author

pchilano commented Aug 4, 2021

Hi Patricio,

The code cleanup/reorg looks good to me.

Thanks for the review David!

Patricio

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

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

Thumbs up.

I like the cleanup and moving InFlightMutexRelease to be
more encapsulated (in mutex.cpp). Also, thanks for flipping
the default state for allow_suspend to false.

@pchilano
Copy link
Contributor Author

pchilano commented Aug 5, 2021

Thumbs up.

I like the cleanup and moving InFlightMutexRelease to be
more encapsulated (in mutex.cpp). Also, thanks for flipping
the default state for allow_suspend to false.

Thanks for the review Dan!

Patricio

@pchilano
Copy link
Contributor Author

pchilano commented Aug 5, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Aug 5, 2021

Going to push as commit 62e72ad.
Since your change was applied there have been 67 commits pushed to the master branch:

  • cb36880: 8270116: Expand ButtonGroupLayoutTraversalTest.java to run in all LaFs, including Aqua on macOS
  • 3ab95d1: 8271905: mark hotspot runtime/Metaspace tests which ignore external VM flags
  • e2c5bfe: 8271308: (fc) FileChannel.transferTo() transfers no more than Integer.MAX_VALUE bytes in one call
  • 7234a43: 8271953: fix mis-merge in JDK-8271878
  • d7fc9e4: 8267840: Improve URLStreamHandler.parseURL()
  • 55bd52a: 8271840: Add simple Integer.toString microbenchmarks
  • 18dd4d4: 8271121: ZGC: stack overflow (segv) when -Xlog:gc+start=debug
  • 685fc3c: 8270903: sun.net.httpserver.HttpConnection: Improve toString
  • 4abe531: 8271722: [TESTBUG] gc/g1/TestMixedGCLiveThreshold.java can fail if G1 Full GC uses >1 workers
  • ea9a595: 8270058: Use Objects.check{Index,FromIndexSize} for java.desktop
  • ... and 57 more: https://git.openjdk.java.net/jdk/compare/249d641889c6f9aed6957502d5fca9c74c9baceb...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 5, 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 labels Aug 5, 2021
@openjdk
Copy link

openjdk bot commented Aug 5, 2021

@pchilano Pushed as commit 62e72ad.

💡 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-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants