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

8326101: [PPC64] Need to bailout cleanly if creation of stubs fails when code cache is out of space #17902

Conversation

TheRealMDoerr
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr commented Feb 17, 2024

e834a48 had missed some PPC64 parts. Note that the PPC64 implementation is similar to SPARC, so we need almost the same changes as that platform. LIR_Assembler::emit_static_call_stub(), LIR_Assembler::emit_trampoline_stub_for_call and CallStubImpl::emit_trampoline_stub already record failures internally.


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-8326101: [PPC64] Need to bailout cleanly if creation of stubs fails when code cache is out of space (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17902

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 17, 2024

👋 Welcome back mdoerr! 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 Feb 17, 2024
@openjdk
Copy link

openjdk bot commented Feb 17, 2024

@TheRealMDoerr 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 Feb 17, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 17, 2024

Webrevs

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.

Looks good.
Cheers, Richard.

@openjdk
Copy link

openjdk bot commented Feb 19, 2024

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

8326101: [PPC64] Need to bailout cleanly if creation of stubs fails when code cache is out of space

Reviewed-by: rrich, mbaesken

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

  • f6d7e30: 8294977: Convert test/jdk/java tests from ASM library to Classfile API
  • 82609b1: 8326112: Javadoc snippet for Linker.Option.captureCallState is wrong
  • a776104: 8326106: Write and clear stack trace table outside of safepoint
  • 56c5084: 8307246: Printing: banded raster path doesn't account for device offset values
  • aeb6d8c: 8326170: Parallel: Remove unused enum CollectionType in ParallelScavengeHeap
  • dc17c26: 8325116: Amend jdk.ContainerConfiguration by swap related value
  • b366492: 8326152: Bad copyright header in test/jdk/java/util/zip/DeflaterDictionaryTests.java
  • 9451677: 8326100: DeflaterDictionaryTests should use Deflater.getBytesWritten instead of Deflater.getTotalOut
  • d422811: 8324630: C1: Canonicalizer::do_LookupSwitch doesn't break the loop when the successor is found
  • 3742bc6: 8323795: jcmd Compiler.codecache should print total size of code cache
  • ... and 6 more: https://git.openjdk.org/jdk/compare/3b76372254aa638f5dcae1d54b963cd43bca7102...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 Feb 19, 2024
@MBaesken
Copy link
Member

Hi Martin, seems we miss the record_failure at some places too on s390

src/hotspot/cpu/s390/s390.ad

1406   address base = __ start_a_stub(size_exception_handler());
1407   if (base == nullptr) {
1408     return 0;          // CodeBuffer::expand failed
1409   }
1410 

src/hotspot/cpu/s390/compiledIC_s390.cpp

56    address stub = __ start_a_stub(CompiledDirectCall::to_interp_stub_size());
57    if (stub == nullptr) {
58      return nullptr;  // CodeBuffer::expand failed.
59    }

do you agree ? Should we file another JBS bug ?

@TheRealMDoerr
Copy link
Contributor Author

@offamitkumar: I think Matthias is right and s390 should get the same fix. Yes, a new JBS issue would be good.

@MBaesken
Copy link
Member

This one probably too I guess

cpu/s390/c1_CodeStubs_s390.cpp:430:  ce->emit_static_call_stub();
cpu/s390/c1_CodeStubs_s390.cpp-431-

@MBaesken
Copy link
Member

I created
https://bugs.openjdk.org/browse/JDK-8326201
[S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space

@offamitkumar
Copy link
Member

Thanks Matthias, I'll look into for s390x port.

@TheRealMDoerr
Copy link
Contributor Author

Thanks for the reviews and for filing the s390 issue!
/integrate

@openjdk
Copy link

openjdk bot commented Feb 19, 2024

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

  • f6d7e30: 8294977: Convert test/jdk/java tests from ASM library to Classfile API
  • 82609b1: 8326112: Javadoc snippet for Linker.Option.captureCallState is wrong
  • a776104: 8326106: Write and clear stack trace table outside of safepoint
  • 56c5084: 8307246: Printing: banded raster path doesn't account for device offset values
  • aeb6d8c: 8326170: Parallel: Remove unused enum CollectionType in ParallelScavengeHeap
  • dc17c26: 8325116: Amend jdk.ContainerConfiguration by swap related value
  • b366492: 8326152: Bad copyright header in test/jdk/java/util/zip/DeflaterDictionaryTests.java
  • 9451677: 8326100: DeflaterDictionaryTests should use Deflater.getBytesWritten instead of Deflater.getTotalOut
  • d422811: 8324630: C1: Canonicalizer::do_LookupSwitch doesn't break the loop when the successor is found
  • 3742bc6: 8323795: jcmd Compiler.codecache should print total size of code cache
  • ... and 6 more: https://git.openjdk.org/jdk/compare/3b76372254aa638f5dcae1d54b963cd43bca7102...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 19, 2024

@TheRealMDoerr Pushed as commit a19314b.

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

@TheRealMDoerr TheRealMDoerr deleted the 8326101_PPC64_C2_record_failure branch February 19, 2024 15:21
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