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

8278341: Liveness check for global scope is not as fast as it could be #6744

Closed
wants to merge 1 commit into from

Conversation

mcimadamore
Copy link
Contributor

@mcimadamore mcimadamore commented Dec 7, 2021

When doing some unrelated performance measurements, I realized that segments backed by global scope were still paying a relatively high cost for liveness checks - that's because GlobalScopeImpl extends from SharedScopeImpl, and does not override the isAlive method. This means that when checking for liveness, we will still do (in some cases - e.g. when calling checkValidStateSlow) a volatile VH get on the scope state - which is useless in this case.

This simple patch adds the missing override.


Progress

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

Issue

  • JDK-8278341: Liveness check for global scope is not as fast as it could be

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6744

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 7, 2021

👋 Welcome back mcimadamore! 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 label Dec 7, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 7, 2021

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

  • core-libs

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 core-libs label Dec 7, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 7, 2021

Webrevs

Copy link
Contributor

@shipilev shipilev left a comment

Looks good!

@openjdk
Copy link

@openjdk openjdk bot commented Dec 7, 2021

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

8278341: Liveness check for global scope is not as fast as it could be

Reviewed-by: shade, jvernee

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

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 label Dec 7, 2021
@mcimadamore
Copy link
Contributor Author

@mcimadamore mcimadamore commented Dec 7, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Dec 7, 2021

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

  • c609b5d: 8277628: Spec for InetAddressResolverProvider::get() throwing error or exception could be clearer
  • bb50b92: 8277536: Use String.blank in jdk.javadoc where applicable
  • 5b81d5e: 8276901: Implement UseHeavyMonitors consistently
  • 69d8669: 8278339: ServerSocket::isClosed may return false after accept throws
  • 56ca66e: 8277863: Deprecate sun.misc.Unsafe methods that return offsets
  • 3536127: 8277383: VM.metaspace optionally show chunk freelist details
  • 44fcee3: 8278289: Drop G1BlockOffsetTablePart::_object_can_span
  • b2638e5: 8244602: Add JTREG_REPEAT_COUNT to repeat execution of a test
  • 07669e3: 8275375: [REDO] JDK-8271949 dumppath in -XX:FlightRecorderOptions does not affect
  • 24877ac: 8278270: ServerSocket is not thread safe
  • ... and 78 more: https://git.openjdk.java.net/jdk/compare/b79554bb5cef14590d427543a40efbcc60c66548...master

Your commit was automatically rebased without conflicts.

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

@openjdk openjdk bot commented Dec 7, 2021

@mcimadamore Pushed as commit bd7c54a.

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

@merykitty
Copy link
Contributor

@merykitty merykitty commented Dec 7, 2021

Hi,
Should checkValidState be overridden with an empty method also?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs integrated
4 participants