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

8321685: Missing ResourceMark in code called from JvmtiEnvBase::get_vthread_jvf #17332

Closed
wants to merge 3 commits into from

Conversation

sspitsyn
Copy link
Contributor

@sspitsyn sspitsyn commented Jan 9, 2024

This fix adds a ResourceMark missing in the SetFramePopClosure::do_thread and SetFramePopClosure::do_vthread.

Testing:

  • TBD to submit tiers: 1-5

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-8321685: Missing ResourceMark in code called from JvmtiEnvBase::get_vthread_jvf (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17332

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 9, 2024

👋 Welcome back sspitsyn! 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 Pull request is ready for review label Jan 9, 2024
@openjdk
Copy link

openjdk bot commented Jan 9, 2024

@sspitsyn 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 Jan 9, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 9, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Jan 10, 2024

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

8321685: Missing ResourceMark in code called from JvmtiEnvBase::get_vthread_jvf

Reviewed-by: amenkov, cjplummer

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 Jan 10, 2024
Copy link
Contributor

@plummercj plummercj 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. Note, it would be good if the jvmti code added comments explaining why a ResourceMark is needed. For these two cases I had to search around until I stumbled across the following in some unrelated code:

// vframes are resource allocated
Thread* current_thread = Thread::current();
ResourceMark rm(current_thread);

This looks very much like the code you are updating, except the updated code is lacking the comment.

@sspitsyn
Copy link
Contributor Author

Alex and Chris, thank you for review!
Chris, I'll add similar comments as you noted. I agree, it will be helpful.

@sspitsyn
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 10, 2024

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

  • ec38505: 8323508: Remove TestGCLockerWithShenandoah.java line from TEST.groups
  • d2d58dd: 8322324: java/foreign/TestStubAllocFailure.java times out while waiting for forked process
  • b2a39c5: 8316241: Test jdk/jdk/jfr/jvm/TestChunkIntegrity.java failed
  • 679f526: 8322278: Generational ZGC: Adjust the comment of ZHeuristics::use_per_cpu_shared_small_pages
  • 2e472fe: 8322294: Cleanup NativePostCallNop
  • 88dafe5: 8314629: Generational ZGC: Clearing All SoftReferences log line lacks GCId

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 10, 2024
@openjdk openjdk bot closed this Jan 10, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 10, 2024
@openjdk
Copy link

openjdk bot commented Jan 10, 2024

@sspitsyn Pushed as commit 2806ade.

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

@sspitsyn
Copy link
Contributor Author

/backport jdk22

@openjdk
Copy link

openjdk bot commented Jan 12, 2024

@sspitsyn the backport was successfully created on the branch backport-sspitsyn-2806adee in my personal fork of openjdk/jdk22. To create a pull request with this backport targeting openjdk/jdk22:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2806adee from the openjdk/jdk repository.

The commit being backported was authored by Serguei Spitsyn on 10 Jan 2024 and was reviewed by Alex Menkov and Chris Plummer.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk22:

$ git fetch https://github.com/openjdk-bots/jdk22.git backport-sspitsyn-2806adee:backport-sspitsyn-2806adee
$ git checkout backport-sspitsyn-2806adee
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22.git backport-sspitsyn-2806adee

@sspitsyn sspitsyn deleted the b16 branch January 23, 2024 01:37
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 serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants