Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
/ jdk22u Public archive

Commit

Permalink
8326101: [PPC64] Need to bailout cleanly if creation of stubs fails w…
Browse files Browse the repository at this point in the history
…hen code cache is out of space

Reviewed-by: mbaesken
Backport-of: a19314b08789afb28e14651868f91d54ed6a9c30
  • Loading branch information
TheRealMDoerr committed Mar 1, 2024
1 parent a8cd7fa commit e3ae81e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
__ extsw(R7_ARG5, length()->as_register());

ce->emit_static_call_stub();
if (ce->compilation()->bailed_out()) {
return; // CodeCache is full
}

bool success = ce->emit_trampoline_stub_for_call(SharedRuntime::get_resolve_static_call_stub());
if (!success) { return; }
Expand Down
10 changes: 8 additions & 2 deletions src/hotspot/cpu/ppc/ppc.ad
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,10 @@ int HandlerImpl::emit_exception_handler(CodeBuffer &cbuf) {
C2_MacroAssembler _masm(&cbuf);

address base = __ start_a_stub(size_exception_handler());
if (base == NULL) return 0; // CodeBuffer::expand failed
if (base == nullptr) {
ciEnv::current()->record_failure("CodeCache is full");
return 0; // CodeBuffer::expand failed
}

int offset = __ offset();
__ b64_patchable((address)OptoRuntime::exception_blob()->content_begin(),
Expand All @@ -2079,7 +2082,10 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf) {
C2_MacroAssembler _masm(&cbuf);

address base = __ start_a_stub(size_deopt_handler());
if (base == NULL) return 0; // CodeBuffer::expand failed
if (base == nullptr) {
ciEnv::current()->record_failure("CodeCache is full");
return 0; // CodeBuffer::expand failed
}

int offset = __ offset();
__ bl64_patchable((address)SharedRuntime::deopt_blob()->unpack(),
Expand Down

5 comments on commit e3ae81e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@TheRealMDoerr
Copy link
Contributor Author

Choose a reason for hiding this comment

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

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on e3ae81e Mar 1, 2024

Choose a reason for hiding this comment

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

@TheRealMDoerr the backport was successfully created on the branch backport-TheRealMDoerr-e3ae81ee in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev: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 e3ae81ee from the openjdk/jdk22u repository.

The commit being backported was authored by Martin Doerr on 1 Mar 2024 and was reviewed by Matthias Baesken.

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/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-TheRealMDoerr-e3ae81ee:backport-TheRealMDoerr-e3ae81ee
$ git checkout backport-TheRealMDoerr-e3ae81ee
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-TheRealMDoerr-e3ae81ee

@TheRealMDoerr
Copy link
Contributor Author

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on e3ae81e Mar 12, 2024

Choose a reason for hiding this comment

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

@TheRealMDoerr the backport was successfully created on the branch backport-TheRealMDoerr-e3ae81ee in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev: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 e3ae81ee from the openjdk/jdk22u repository.

The commit being backported was authored by Martin Doerr on 1 Mar 2024 and was reviewed by Matthias Baesken.

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/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev.git backport-TheRealMDoerr-e3ae81ee:backport-TheRealMDoerr-e3ae81ee
$ git checkout backport-TheRealMDoerr-e3ae81ee
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev.git backport-TheRealMDoerr-e3ae81ee

⚠️ @TheRealMDoerr You are not yet a collaborator in my fork openjdk-bots/jdk17u-dev. An invite will be sent out and you need to accept it before you can proceed.

Please sign in to comment.