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
Backport-of: d5f3d5c8cc347ae384dea25b1a55ed57204d1af3
  • Loading branch information
offamitkumar authored and TheRealMDoerr committed May 13, 2024
1 parent 16579f8 commit 606c542
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, 2020, 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 @@ -445,6 +445,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, 2021, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2017, 2020 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 @@ -1466,6 +1466,7 @@ int HandlerImpl::emit_exception_handler(CodeBuffer &cbuf) {

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

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

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

Expand Down

1 comment on commit 606c542

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.