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

8265453: SafepointMechanism::should_process() should receive JavaThread* #3603

Closed
wants to merge 1 commit into from

Conversation

@pchilano
Copy link
Contributor

@pchilano pchilano commented Apr 21, 2021

Hi,

Please review this cleanup in class SafepointMechanism. Since method should_process() is only called by JavaThreads the check in local_poll() is redundant. It also makes the generated code for should_process() unnecessary long since we only need to check the poll bit. I only had to fix a couple of calls from the zero interpreter that where passing a Thread* instead of a JavaThread*.
Tested tier1 in mach5 and that it builds zero.

Thanks,
Patricio


Progress

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

Issue

  • JDK-8265453: SafepointMechanism::should_process() should receive JavaThread*

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3603

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 21, 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.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 21, 2021

@pchilano 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 Apr 21, 2021
@pchilano
Copy link
Contributor Author

@pchilano pchilano commented Apr 21, 2021

/label add hotspot-runtime

Loading

@pchilano
Copy link
Contributor Author

@pchilano pchilano commented Apr 21, 2021

/label remove hotspot

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 21, 2021

@pchilano
The hotspot-runtime label was successfully added.

Loading

@openjdk openjdk bot removed the hotspot label Apr 21, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 21, 2021

@pchilano
The hotspot label was successfully removed.

Loading

@pchilano pchilano marked this pull request as ready for review Apr 21, 2021
@openjdk openjdk bot added the rfr label Apr 21, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 21, 2021

Webrevs

Loading

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Thumbs up.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 21, 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:

8265453: SafepointMechanism::should_process() should receive JavaThread*

Reviewed-by: dcubed, shade, 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 34 new commits pushed to the master branch:

  • ca6b1b4: 8171381: [TEST_BUG] [macos] javax/swing/JPopupMenu/7156657/bug7156657.java fails on OS X
  • 9e7c748: 8265700: Regularize throws clauses in BigDecimal
  • 7116321: 8254565: JFR: Incorrect verification of mirror events
  • f45d460: 8265017: runtime/HiddenClasses/StressHiddenClasses.java timed out on Win* OCI
  • 0136c89: 8265490: Unterminated string passed to FindClass() in hotspot test
  • 325edbc: 8265450: Merge PreservedMarksSet::restore code paths
  • b337f63: 8037397: RegEx pattern matching loses character class after intersection (&&) operator
  • 07a7510: 8200145: Conditional expression mistakenly treated as standalone
  • 41fc7dd: 8199079: Test javax/swing/UIDefaults/6302464/bug6302464.java is unstable
  • 45c474a: 8168408: Test java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java fails intermittentently on windows
  • ... and 24 more: https://git.openjdk.java.net/jdk/compare/d61345984d56cc46161ffea097afbd899081f3cf...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 Apr 21, 2021
@pchilano
Copy link
Contributor Author

@pchilano pchilano commented Apr 21, 2021

Thumbs up.
Thanks Dan!

Patricio

Loading

Copy link
Contributor

@shipilev shipilev left a comment

Zero change looks fine. It also passes bootcycle-images on Linux Zero x86_64 fastdebug, which is a good sanity test for this code.

Loading

@pchilano
Copy link
Contributor Author

@pchilano pchilano commented Apr 21, 2021

Zero change looks fine. It also passes bootcycle-images on Linux Zero x86_64 fastdebug, which is a good sanity test for this code.
Great, thanks Aleksey!

Patricio

Loading

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Hi Patricio,

LGTM2! :)

Thanks,
David

Loading

@@ -551,8 +551,9 @@ int ZeroInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
}

int ZeroInterpreter::getter_entry(Method* method, intptr_t UNUSED, TRAPS) {
JavaThread* thread = THREAD->as_Java_thread();
Copy link
Member

@dholmes-ora dholmes-ora Apr 22, 2021

Choose a reason for hiding this comment

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

This will be unnecessary after my TRAPS change but that is still a little ways off. :)

Loading

if (thread->is_Java_thread()) {
return local_poll_armed(thread->as_Java_thread());
} else {
// If the poll is on a non-java thread we can only check the global state.
Copy link
Member

@dholmes-ora dholmes-ora Apr 22, 2021

Choose a reason for hiding this comment

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

I had wondered how this case could arise - good to see it gone.

Loading

@pchilano
Copy link
Contributor Author

@pchilano pchilano commented Apr 22, 2021

Hi Patricio,

LGTM2! :)

Thanks David!

Patricio

Loading

@pchilano
Copy link
Contributor Author

@pchilano pchilano commented Apr 22, 2021

/integrate

Loading

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

@openjdk openjdk bot commented Apr 22, 2021

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

  • fa82d47: 8264514: HexFormat implementation tweaks
  • e16d568: 8265218: trace_method_handle_stub fails to find calling frame on x86
  • 86bd44f: 8257831: Suspend with handshakes
  • 28af31d: 8263668: Update java.time to use instanceof pattern variable
  • a93d911: 8265607: Avoid decrementing when no Symbol was created in ~SignatureStream
  • aa29784: 8265332: gtest/LargePageGtests.java OOMEs on -XX:+UseSHM cases
  • 33b6378: 8265101: Remove unnecessary functions in os*.inline.hpp
  • 28c35ae: 8259288: Debug build failure with clang-10 due to -Wimplicit-int-float-conversion
  • ca6b1b4: 8171381: [TEST_BUG] [macos] javax/swing/JPopupMenu/7156657/bug7156657.java fails on OS X
  • 9e7c748: 8265700: Regularize throws clauses in BigDecimal
  • ... and 32 more: https://git.openjdk.java.net/jdk/compare/d61345984d56cc46161ffea097afbd899081f3cf...master

Your commit was automatically rebased without conflicts.

Pushed as commit 6d49cc3.

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

Loading

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