Skip to content

JDK-8288121: [JVMCI] Re-export the TerminatingThreadLocal functionality to the graal compiler.#9107

Closed
tzezula wants to merge 2 commits intoopenjdk:masterfrom
tzezula:JDK-8288121
Closed

JDK-8288121: [JVMCI] Re-export the TerminatingThreadLocal functionality to the graal compiler.#9107
tzezula wants to merge 2 commits intoopenjdk:masterfrom
tzezula:JDK-8288121

Conversation

@tzezula
Copy link
Contributor

@tzezula tzezula commented Jun 9, 2022

JVMCI compilers need to release resources tied to a thread-local variable when the associated thread is exiting. The JDK internally uses the jdk.internal.misc.TerminatingThreadLocal class for this purpose. This pull request re-exports the TerminatingThreadLocal functionality to JVMCI compilers.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8288121: [JVMCI] Re-export the TerminatingThreadLocal functionality to the graal compiler.

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9107/head:pull/9107
$ git checkout pull/9107

Update a local copy of the PR:
$ git checkout pull/9107
$ git pull https://git.openjdk.org/jdk pull/9107/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9107

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9107.diff

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Jun 9, 2022
@bridgekeeper
Copy link

bridgekeeper bot commented Jun 9, 2022

Hi @tzezula, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user tzezula" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Jun 9, 2022

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

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Jun 9, 2022
@tzezula tzezula changed the title JDK-8288121: Re-export the TerminatingThreadLocal functionality to the graal compiler. JDK-8288121: [JVMCI] Re-export the TerminatingThreadLocal functionality to the graal compiler. Jun 9, 2022
@tzezula tzezula force-pushed the JDK-8288121 branch 2 times, most recently from 9a3e7c0 to d53c90f Compare June 11, 2022 09:02
@tzezula
Copy link
Contributor Author

tzezula commented Jun 13, 2022

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Jun 13, 2022
@bridgekeeper
Copy link

bridgekeeper bot commented Jun 13, 2022

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Jun 23, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 23, 2022
@mlbridge
Copy link

mlbridge bot commented Jun 23, 2022

Webrevs

@vnkozlov
Copy link
Contributor

@dougxc, can you review this? It is out of my expertise.

@dougxc
Copy link
Member

dougxc commented Jun 29, 2022

@dougxc, can you review this? It is out of my expertise.

Since I helped craft this change, it should really get another reviewer. @dholmes-ora maybe you could look at it? TL;DR this PR is exposing TerminatingThreadLocal for use by Graal.

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 27, 2022

@tzezula This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@tzezula
Copy link
Contributor Author

tzezula commented Aug 8, 2022

Still valid PR.

@dougxc
Copy link
Member

dougxc commented Aug 8, 2022

@plevart any chance you could look at this PR since you introduced TerminatingThreadLocal.

@dougxc
Copy link
Member

dougxc commented Aug 16, 2022

Note that we also considered an alternate solution which would be to export java.base/jdk.internal.misc to jdk.internal.vm.compiler. However, this is not possible without making jdk.internal.vm.compiler a non-upgradeable module.

Copy link
Contributor

@tkrodriguez tkrodriguez left a comment

Choose a reason for hiding this comment

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

I don't see any better solution at the moment.

@openjdk
Copy link

openjdk bot commented Aug 16, 2022

⚠️ @tzezula the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout JDK-8288121
$ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Aug 16, 2022

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

8288121: [JVMCI] Re-export the TerminatingThreadLocal functionality to the graal compiler.

Reviewed-by: dnsimon, never

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

  • 833bf06: 8292608: [AIX] Broken build after 8291945
  • 62a7fc6: 8292315: Tests should not rely on specific JAR file names (hotspot)
  • 20a3cb7: 8292488: JFR: Incorrect comment in ActiveRecordingEvent
  • f567fa0: 8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]"
  • d00e7b9: 8292544: G1: Remove virtual specifier for methods in G1EdenRegions and G1SurvivorRegions
  • f2773f6: 8292556: Clean up unused Hashtable instantiations
  • d543564: 8289334: Use CSS variables to define fonts and colors
  • 2ee9491: 8289051: C2: Cleanup PhaseCCP::analyze()
  • 32d675c: 8291775: C2: assert(r != __null && r->is_Region()) failed: this phi must have a region
  • 0d96546: 8292054: Test runtime/posixSig/TestPosixSig.java fails with 'Test failed, bad output.'
  • ... and 827 more: https://git.openjdk.org/jdk/compare/59b0de6bc7064b39cdc51517dee4f4d96af3efaf...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dougxc, @tkrodriguez) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 16, 2022
@tzezula
Copy link
Contributor Author

tzezula commented Aug 18, 2022

/integrate

@openjdk-notifier
Copy link

@tzezula Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

@dougxc
Copy link
Member

dougxc commented Aug 18, 2022

/sponsor

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Aug 18, 2022
@openjdk
Copy link

openjdk bot commented Aug 18, 2022

@tzezula
Your change (at version 1a56ef4) is now ready to be sponsored by a Committer.

@openjdk
Copy link

openjdk bot commented Aug 18, 2022

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

  • 833bf06: 8292608: [AIX] Broken build after 8291945
  • 62a7fc6: 8292315: Tests should not rely on specific JAR file names (hotspot)
  • 20a3cb7: 8292488: JFR: Incorrect comment in ActiveRecordingEvent
  • f567fa0: 8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]"
  • d00e7b9: 8292544: G1: Remove virtual specifier for methods in G1EdenRegions and G1SurvivorRegions
  • f2773f6: 8292556: Clean up unused Hashtable instantiations
  • d543564: 8289334: Use CSS variables to define fonts and colors
  • 2ee9491: 8289051: C2: Cleanup PhaseCCP::analyze()
  • 32d675c: 8291775: C2: assert(r != __null && r->is_Region()) failed: this phi must have a region
  • 0d96546: 8292054: Test runtime/posixSig/TestPosixSig.java fails with 'Test failed, bad output.'
  • ... and 827 more: https://git.openjdk.org/jdk/compare/59b0de6bc7064b39cdc51517dee4f4d96af3efaf...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 18, 2022
@openjdk openjdk bot closed this Aug 18, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Aug 18, 2022
@openjdk
Copy link

openjdk bot commented Aug 18, 2022

@dougxc @tzezula Pushed as commit 97e2689.

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

Development

Successfully merging this pull request may close these issues.

4 participants