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

8256754: Deoptimization::revoke_for_object_deoptimization: stack processing start call is redundant #1381

Closed
wants to merge 2 commits into from
Closed

8256754: Deoptimization::revoke_for_object_deoptimization: stack processing start call is redundant #1381

wants to merge 2 commits into from

Conversation

reinrich
Copy link
Member

@reinrich reinrich commented Nov 23, 2020

This is a XS clean-up of Deoptimization::revoke_for_object_deoptimization() which removes the StackWatermarkSet::start_processing() call.

This is correct because all paths leading to revoke_for_object_deoptimization() are equipped with a KeepStackGCProcessedMark.

Call Tree:

StackWatermarkSet::start_processing(JavaThread *, enum StackWatermarkKind) : void
    Deoptimization::revoke_for_object_deoptimization(JavaThread *, frame, RegisterMap *, JavaThread *) : void
        Deoptimization::deoptimize_objects_internal(JavaThread *, GrowableArray<compiledVFrame *> *, bool &) : bool
            EscapeBarrier::deoptimize_objects_internal(JavaThread *, intptr_t *) : bool
                EscapeBarrier::deoptimize_objects_all_threads() : bool                     // has KeepStackGCProcessedMark
                EscapeBarrier::deoptimize_objects(intptr_t *) : bool
                    EscapeBarrier::deoptimize_objects(int, int) : bool                     // has KeepStackGCProcessedMark 

Testing: hotspot_serviceability, jdk_svc, jdk_jdi, vmTestbase_nsk_jdi, vmTestbase_nsk_jvmti, vmTestbase_nsk_jdwp with -XX:+UseZGC.


Progress

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

Testing

Linux aarch64 Linux arm Linux ppc64le Linux s390x Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (6/6 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Issue

  • JDK-8256754: Deoptimization::revoke_for_object_deoptimization: stack processing start call is redundant

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 23, 2020

👋 Welcome back rrich! 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 Nov 23, 2020

@reinrich 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.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Nov 23, 2020
@reinrich reinrich marked this pull request as ready for review November 23, 2020 15:26
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 23, 2020
@mlbridge
Copy link

mlbridge bot commented Nov 23, 2020

Webrevs

Copy link
Member

@dean-long dean-long left a comment

Choose a reason for hiding this comment

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

The justification for removing this code is that all callers use KeepStackGCProcessedMark. Is there an assert you can add in place of the removed code that checks this invariant?

Copy link
Contributor

@fisk fisk left a comment

Choose a reason for hiding this comment

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

Looks good.

@openjdk
Copy link

openjdk bot commented Nov 24, 2020

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

8256754: Deoptimization::revoke_for_object_deoptimization: stack processing start call is redundant

Reviewed-by: dlong, eosterlund

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

  • 3c230b8: 8256993: Clarify Package::isSealed javadoc about package sealing vs sealed class or interface
  • 1b7a61f: 8254999: Move G1RemSetSamplingTask to more appropriate location
  • 695117f: 8255479: [aarch64] assert(src->section_index_of(target) == CodeBuffer::SECT_NONE) failed: sanity
  • dbfeb90: 8243559: Remove root certificates with 1024-bit keys
  • 2a1e9be: 8256364: vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002 failed with "assert(handle != __null) failed: JNI handle should not be null"
  • f1d6e8d: 8256387: Unexpected result if patching an entire instruction on AArch64
  • bd14274: 8256480: Refactor ObjectInputStream field reader implementation
  • 1c4c99e: 8256823: C2 compilation fails with "assert(isShiftCount(imm8 >> 1)) failed: illegal shift count"
  • 3b3e90e: 8256924: ppc, ppcle, s390: JVM crashes at VM init after JDK-8254231
  • ff6df15: 8256801: tools/jpackage/share/FileAssociationsTest.java#id0 failed unpack.bat with "Exit code: 1603"
  • ... and 32 more: https://git.openjdk.java.net/jdk/compare/53f38353e0d07b8b4435ed435390ed01e9b24d59...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 Nov 24, 2020
@reinrich
Copy link
Member Author

Thanks for having a look @dean-long

The justification for removing this code is that all callers use KeepStackGCProcessedMark. Is there an assert you can add in place of the removed code that checks this invariant?

I don't think there is an assert I could use. I added code that allows for asserting this. Let me know which version you prefer.

@reinrich
Copy link
Member Author

Looks good.

Thank you @fisk
Note that I added code to assert that the remote stack is kept gc processed. Just in case you have comments on that.

@dean-long
Copy link
Member

I like the version with the assert.

@reinrich
Copy link
Member Author

I like the version with the assert.

Good. Thanks for reviewing!

@reinrich
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this Nov 30, 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 Nov 30, 2020
@openjdk
Copy link

openjdk bot commented Nov 30, 2020

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

Your commit was automatically rebased without conflicts.

Pushed as commit e77aed6.

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