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

8307462: [REDO] VmObjectAlloc is not generated by intrinsics methods which allocate objects #15110

Closed
wants to merge 6 commits into from

Conversation

lmesnik
Copy link
Member

@lmesnik lmesnik commented Aug 1, 2023

The fix adds posting VmObjectAlloc events by Unsafe.allocateInstance(Class<?> cls). The previous attempt to post event directly from 'LibraryCallKit::inline_unsafe_allocate()' cause performance regression even if jvmti event is not enabled. Some optimizations have been disabled just because possible usage and escaping of newly allocated object.
So event posting is doing by returning to interpreter if events are enabled.

I verified that that performance (run locally only) of
org.renaissance.jdk.streams.JmhScrabble.runOperation
doesn't change if events are not enabled.

There might be other intrinsics like 'LibraryCallKit::inline_unsafe_newArray()' where VM allocate memory. I'm going to file separate issue to find and fix them.

Many thanks to Tobias H. for proposed solution.

Testing with all tiers.


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-8307462: [REDO] VmObjectAlloc is not generated by intrinsics methods which allocate objects (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15110

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 1, 2023

👋 Welcome back lmesnik! 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 Aug 1, 2023

@lmesnik 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 Aug 1, 2023
@lmesnik lmesnik marked this pull request as ready for review August 3, 2023 02:44
@lmesnik
Copy link
Member Author

lmesnik commented Aug 3, 2023

/cc hotspot-compiler

@openjdk openjdk bot added rfr Pull request is ready for review hotspot-compiler hotspot-compiler-dev@openjdk.org labels Aug 3, 2023
@openjdk
Copy link

openjdk bot commented Aug 3, 2023

@lmesnik
The hotspot-compiler label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Aug 3, 2023

Webrevs

Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

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

This looks okay to me.
It needs to be reviewed by someone from the compiler team.
Thanks,
Serguei

@openjdk
Copy link

openjdk bot commented Aug 4, 2023

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

8307462: [REDO] VmObjectAlloc is not generated by intrinsics methods which allocate objects

Reviewed-by: sspitsyn, thartmann

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

  • d3b578f: 8313345: SuperWord fails due to CMove without matching Bool pack
  • 31a307f: 8306441: Two phase segmented heap dump
  • 515add8: 8313206: PKCS11 tests silently skip execution
  • 6864441: 8313809: String template fails with java.lang.StringIndexOutOfBoundsException if last fragment is UTF16
  • 509f80b: 8313889: Fix -Wconversion warnings in foreign benchmarks
  • 5c3041c: 8313435: Clean up unused default methods code
  • 8752d49: 8313785: Fix -Wconversion warnings in prims code
  • 41bdcde: 8313875: Use literals instead of static fields in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown
  • 091e65e: 8313552: Fix -Wconversion warnings in JFR code
  • 7e20952: 8140326: G1: Consider putting regions where evacuation failed into next collection set
  • ... and 87 more: https://git.openjdk.org/jdk/compare/d6245b6832ccd1da04616e8ba4b90321b2551971...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 Aug 4, 2023
Copy link
Member

@TobiHartmann TobiHartmann 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 to me.

Comment on lines 2844 to 2845
if (stopped())
return true;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (stopped())
return true;
if (stopped()) {
return true;
}

@lmesnik
Copy link
Member Author

lmesnik commented Aug 9, 2023

@sspitsyn, @TobiHartmann Thank you for review.
/integrate

@openjdk
Copy link

openjdk bot commented Aug 9, 2023

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

  • 0a42c44: 8313954: Add gc logging to vmTestbase/vm/gc/containers/Combination05
  • 735b16a: 8313752: InstanceKlassFlags::print_on doesn't print the flag names
  • d3b578f: 8313345: SuperWord fails due to CMove without matching Bool pack
  • 31a307f: 8306441: Two phase segmented heap dump
  • 515add8: 8313206: PKCS11 tests silently skip execution
  • 6864441: 8313809: String template fails with java.lang.StringIndexOutOfBoundsException if last fragment is UTF16
  • 509f80b: 8313889: Fix -Wconversion warnings in foreign benchmarks
  • 5c3041c: 8313435: Clean up unused default methods code
  • 8752d49: 8313785: Fix -Wconversion warnings in prims code
  • 41bdcde: 8313875: Use literals instead of static fields in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown
  • ... and 89 more: https://git.openjdk.org/jdk/compare/d6245b6832ccd1da04616e8ba4b90321b2551971...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 9, 2023

@lmesnik Pushed as commit 3fb4805.

💡 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 hotspot-compiler hotspot-compiler-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