Skip to content

Commit

Permalink
8326201: [S390] Need to bailout cleanly if creation of stubs fails wh…
Browse files Browse the repository at this point in the history
…en code cache is out of space

Reviewed-by: lucy, mdoerr
  • Loading branch information
offamitkumar committed Feb 21, 2024
1 parent d31fd78 commit d5f3d5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/hotspot/cpu/s390/c1_CodeStubs_s390.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -428,6 +428,7 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
"must be aligned");

ce->emit_static_call_stub();
CHECK_BAILOUT();

// Prepend each BRASL with a nop.
__ relocate(relocInfo::static_call_type);
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/cpu/s390/s390.ad
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2017, 2022 SAP SE. All rights reserved.
// Copyright (c) 2017, 2024 SAP SE. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -1405,6 +1405,7 @@ int HandlerImpl::emit_exception_handler(CodeBuffer &cbuf) {

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

Expand All @@ -1426,6 +1427,7 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf) {
address base = __ start_a_stub(size_deopt_handler());

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

Expand Down

9 comments on commit d5f3d5c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@offamitkumar
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk22u

@openjdk
Copy link

@openjdk openjdk bot commented on d5f3d5c Apr 26, 2024

Choose a reason for hiding this comment

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

@offamitkumar Could not automatically backport d5f3d5c8 to openjdk/jdk22u due to conflicts in the following files:

  • src/hotspot/cpu/s390/s390.ad

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk22u. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk22u.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-offamitkumar-d5f3d5c8

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git d5f3d5c8cc347ae384dea25b1a55ed57204d1af3

# Backport the commit
$ git cherry-pick --no-commit d5f3d5c8cc347ae384dea25b1a55ed57204d1af3
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk22u with the title Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3.

Below you can find a suggestion for the pull request body:

Hi all,

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

The commit being backported was authored by Amit Kumar on 21 Feb 2024 and was reviewed by Lutz Schmidt and Martin Doerr.

Thanks!

@offamitkumar
Copy link
Member 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 d5f3d5c May 3, 2024

Choose a reason for hiding this comment

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

@offamitkumar Could not automatically backport d5f3d5c8 to openjdk/jdk21u-dev due to conflicts in the following files:

  • src/hotspot/cpu/s390/s390.ad

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk21u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk21u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-offamitkumar-d5f3d5c8

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git d5f3d5c8cc347ae384dea25b1a55ed57204d1af3

# Backport the commit
$ git cherry-pick --no-commit d5f3d5c8cc347ae384dea25b1a55ed57204d1af3
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk21u-dev with the title Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3.

Below you can find a suggestion for the pull request body:

Hi all,

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

The commit being backported was authored by Amit Kumar on 21 Feb 2024 and was reviewed by Lutz Schmidt and Martin Doerr.

Thanks!

@offamitkumar
Copy link
Member 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 d5f3d5c May 4, 2024

Choose a reason for hiding this comment

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

@offamitkumar Could not automatically backport d5f3d5c8 to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/hotspot/cpu/s390/c1_CodeStubs_s390.cpp
  • src/hotspot/cpu/s390/s390.ad

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-offamitkumar-d5f3d5c8

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git d5f3d5c8cc347ae384dea25b1a55ed57204d1af3

# Backport the commit
$ git cherry-pick --no-commit d5f3d5c8cc347ae384dea25b1a55ed57204d1af3
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3.

Below you can find a suggestion for the pull request body:

Hi all,

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

The commit being backported was authored by Amit Kumar on 21 Feb 2024 and was reviewed by Lutz Schmidt and Martin Doerr.

Thanks!

@offamitkumar
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on d5f3d5c May 9, 2024

Choose a reason for hiding this comment

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

@offamitkumar Could not automatically backport d5f3d5c8 to openjdk/jdk11u-dev due to conflicts in the following files:

  • src/hotspot/cpu/s390/c1_CodeStubs_s390.cpp
  • src/hotspot/cpu/s390/s390.ad

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk11u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk11u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-offamitkumar-d5f3d5c8

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git d5f3d5c8cc347ae384dea25b1a55ed57204d1af3

# Backport the commit
$ git cherry-pick --no-commit d5f3d5c8cc347ae384dea25b1a55ed57204d1af3
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3.

Below you can find a suggestion for the pull request body:

Hi all,

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

The commit being backported was authored by Amit Kumar on 21 Feb 2024 and was reviewed by Lutz Schmidt and Martin Doerr.

Thanks!

Please sign in to comment.