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

8290706: Remove the support for inline contiguous allocations #9576

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Jul 20, 2022

See the bug for rationale and link to RFC.

This removes the 3rd allocation path (first two being TLAB and native GC interface), that is used by Serial/Parallel when TLABs are not available. There is little sense in keeping this code, especially since it requires supporting a bunch of platform-specific assembly.

Additional testing:

Apart from x86 and AArch64, I only verified the cross-compilation builds pass, no other testing is done.

I did not touch the JVMCI interfaces, since I am not sure what is the proper protocol for JVMCI changes.


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-8290706: Remove the support for inline contiguous allocations

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9576

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 20, 2022

👋 Welcome back shade! 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 Jul 20, 2022

@shipilev 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 Jul 20, 2022
@shipilev shipilev marked this pull request as ready for review July 21, 2022 05:34
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 21, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 21, 2022

Webrevs

@reinrich
Copy link
Member

jtreg:test/hotspot/jtreg:tier1 succeeded (without gtests) on ppc64le. More tests overnight.

@bulasevich
Copy link
Contributor

:hotspot and :tier1 is OK on ARM32

@RealFYang
Copy link
Member

Performed tier1 test on riscv64-linux. Result looks good.

@snazarkin
Copy link
Contributor

snazarkin commented Jul 22, 2022

Got assert on arm-server-fastdebug. (Update) master seems affected as well. So this is an unrelated issue.

#  Internal Error (/home/user/jdk/src/hotspot/cpu/arm/arm.ad:240), pid=24155, tid=24168
#  assert(constant_table.size() == consts_size) failed: must be: 208 == 200
#
# JRE version: OpenJDK Runtime Environment (20.0) (fastdebug build 20-internal-adhoc.user.jdk)
# Java VM: OpenJDK Server VM (fastdebug 20-internal-adhoc.user.jdk, mixed mode, g1 gc, linux-arm)
# Problematic frame:
# V  [libjvm.so+0xe2ed8]  MachConstantBaseNode::emit(CodeBuffer&, PhaseRegAlloc*) const+0x22b

@shipilev
Copy link
Member Author

All right, so the current status is that all platforms (except for S390X test) are checked. GHA are also happy.

Please do formal reviews :)

@RealLucy
Copy link
Contributor

All right, so the current status is that all platforms (except for S390X test) are checked. GHA are also happy.

I do not see a particular risk for s390x, mainly because the path being removed was never implemented for s390x.
@backwaterred may be able to build and run tier1 tests to add some safety to my assumptions.

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 in general. However, the StorePConditionalNode is dead after this change, and I think we should remove that one as well while we are at it. AFAIK it is only used for the atomic bump pointer code. There is a whole bunch of StorePConditional matching rules in all the ad files that can be nuked, and a few mentions of Op_StorePConditional in C2 that can be removed.

@shipilev
Copy link
Member Author

Looks good in general. However, the StorePConditionalNode is dead after this change, and I think we should remove that one as well while we are at it. AFAIK it is only used for the atomic bump pointer code. There is a whole bunch of StorePConditional matching rules in all the ad files that can be nuked, and a few mentions of Op_StorePConditional in C2 that can be removed.

True. I'd rather do that after this change lands, as to not invalidate the platform testing already done here. It would be also beneficial for potential bisects to have two atomic commits -- one removing the code from allocation paths, and another removing the C2 nodes and match rules. WDYT?

Copy link
Contributor

@theRealAph theRealAph left a comment

Choose a reason for hiding this comment

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

Good. It's nice to get rid of that code.

@theRealAph
Copy link
Contributor

Looks good in general. However, the StorePConditionalNode is dead after this change, and I think we should remove that one as well while we are at it. AFAIK it is only used for the atomic bump pointer code. There is a whole bunch of StorePConditional matching rules in all the ad files that can be nuked, and a few mentions of Op_StorePConditional in C2 that can be removed.

True. I'd rather do that after this change lands, as to not invalidate the platform testing already done here. It would be also beneficial for potential bisects to have two atomic commits -- one removing the code from allocation paths, and another removing the C2 nodes and match rules. WDYT?

Yes, I agree. There's more cruft in there.

@openjdk
Copy link

openjdk bot commented Jul 25, 2022

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

8290706: Remove the support for inline contiguous allocations

Reviewed-by: eosterlund, aph, rrich, fyang, 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 33 new commits pushed to the master branch:

  • 8939095: 8289996: Fix array range check hoisting for some scaled loop iv
  • da9cc5c: 8290806: Only add eager reclaim task to G1 post evacuate tasks if there were candidates
  • 330adc0: 8290969: DumpClassListCLDClosure incorrectly uses ResizeableResourceHashtable
  • 28bbdc5: 8290972: ProblemList java/lang/ProcessBuilder/PipelineLeaksFD.java
  • a6faf5d: 8290485: [vector] REVERSE_BYTES for byte type should not emit any instructions
  • 0ca5cb1: 8290834: Improve potentially confusing documentation on collection of profiling information
  • 7c3cfd1: 8290557: tools/jpackage/share/AddLauncherTest.java#id1 failed with "ERROR: Failed: Check icon file"
  • 0ca74f5: 8289659: Refactor I/O stream copying to use InputStream.readAllBytes in X509CertPath
  • 1e270ea: 8290780: AArch64: Crash in c2 nmethod running RunThese30M.java
  • b17269a: 8290959: Consistently use "grey" instead of "gray" in GC code
  • ... and 23 more: https://git.openjdk.org/jdk/compare/6346c3338c23255a43b179cbd618990c31c2eabc...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 Jul 25, 2022
Copy link
Member

@reinrich reinrich left a comment

Choose a reason for hiding this comment

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

No findings in our CI testing which includes JCK and JTREG tests on the standard platforms and also on Linux/PPC64le.

I've reviewed the ppc changes. They look good to me.

Thanks, Richard.

@fisk
Copy link
Contributor

fisk commented Jul 25, 2022

Looks good in general. However, the StorePConditionalNode is dead after this change, and I think we should remove that one as well while we are at it. AFAIK it is only used for the atomic bump pointer code. There is a whole bunch of StorePConditional matching rules in all the ad files that can be nuked, and a few mentions of Op_StorePConditional in C2 that can be removed.

True. I'd rather do that after this change lands, as to not invalidate the platform testing already done here. It would be also beneficial for potential bisects to have two atomic commits -- one removing the code from allocation paths, and another removing the C2 nodes and match rules. WDYT?

Sounds good to me.

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.

Copy link
Member

@RealFYang RealFYang left a comment

Choose a reason for hiding this comment

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

RISCV-specific changes looks good to me. Thanks.

@shipilev
Copy link
Member Author

All right, thank you all, I will be integrating soon then.

@TobiHartmann, @vnkozlov -- want to sanity check the C2 refactor?

@shipilev
Copy link
Member Author

Sounds good to me.

FYI, that would hopefully be in #9636 -- we can remove quite a bit more than just StorePConditional :)

@bulasevich
Copy link
Contributor

bulasevich commented Jul 26, 2022

Got assert on arm-server-fastdebug. (Update) master seems affected as well. So this is an unrelated issue.

Let me will look into it. JDK-8291003

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.

JIT changes look good to me.

src/hotspot/share/gc/shared/c2/barrierSetC2.cpp Outdated Show resolved Hide resolved
@shipilev
Copy link
Member Author

All right, thank you all. I am integrating and dealing with the rest of the issues, if any, later.

/integrate

@openjdk
Copy link

openjdk bot commented Jul 26, 2022

Going to push as commit 8159a1a.
Since your change was applied there have been 35 commits pushed to the master branch:

  • 7318b22: 8289551: Conversions between bit representations of half precision values and floats
  • 2ae8e31: 8290669: Fix wording in sun.security.ec
  • 8939095: 8289996: Fix array range check hoisting for some scaled loop iv
  • da9cc5c: 8290806: Only add eager reclaim task to G1 post evacuate tasks if there were candidates
  • 330adc0: 8290969: DumpClassListCLDClosure incorrectly uses ResizeableResourceHashtable
  • 28bbdc5: 8290972: ProblemList java/lang/ProcessBuilder/PipelineLeaksFD.java
  • a6faf5d: 8290485: [vector] REVERSE_BYTES for byte type should not emit any instructions
  • 0ca5cb1: 8290834: Improve potentially confusing documentation on collection of profiling information
  • 7c3cfd1: 8290557: tools/jpackage/share/AddLauncherTest.java#id1 failed with "ERROR: Failed: Check icon file"
  • 0ca74f5: 8289659: Refactor I/O stream copying to use InputStream.readAllBytes in X509CertPath
  • ... and 25 more: https://git.openjdk.org/jdk/compare/6346c3338c23255a43b179cbd618990c31c2eabc...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jul 26, 2022

@shipilev Pushed as commit 8159a1a.

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

@shipilev shipilev deleted the JDK-8290706-remove-inline-contig branch September 5, 2022 13:48
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
Development

Successfully merging this pull request may close these issues.

9 participants