[jdk22u] RFR: 8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space

Amit Kumar amitkumar at openjdk.org
Tue Apr 30 12:21:40 UTC 2024


On Fri, 26 Apr 2024 16:51:26 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

> Hi all,
> 
> This pull request contains a backport of commit [d5f3d5c8](https://github.com/openjdk/jdk/commit/d5f3d5c8cc347ae384dea25b1a55ed57204d1af3) from the [openjdk/jdk](https://git.openjdk.org/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!

Got these merge conflicts,  looks a clean backport: 


amitkumar at Amits-MacBook-Pro jdk22u % git diff 
diff --cc src/hotspot/cpu/s390/s390.ad
index 9f4e182a9e4,5fcb885cdc3..00000000000
--- a/src/hotspot/cpu/s390/s390.ad
+++ b/src/hotspot/cpu/s390/s390.ad
@@@ -1,6 -1,6 +1,11 @@@
  //
++<<<<<<< HEAD
 +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
 +// Copyright (c) 2017, 2022 SAP SE. All rights reserved.
++=======
+ // Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
+ // Copyright (c) 2017, 2024 SAP SE. All rights reserved.
++>>>>>>> d5f3d5c8cc3 (8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space)
  // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  //
  // This code is free software; you can redistribute it and/or modify it
@@@ -1446,7 -1404,8 +1451,12 @@@ int HandlerImpl::emit_exception_handler
    C2_MacroAssembler _masm(&cbuf);
  
    address base = __ start_a_stub(size_exception_handler());
++<<<<<<< HEAD
 +  if (base == NULL) {
++=======
+   if (base == nullptr) {
+     ciEnv::current()->record_failure("CodeCache is full");
++>>>>>>> d5f3d5c8cc3 (8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space)
      return 0;          // CodeBuffer::expand failed
    }
  
@@@ -1467,7 -1426,8 +1477,12 @@@ int HandlerImpl::emit_deopt_handler(Cod
    C2_MacroAssembler _masm(&cbuf);
    address        base = __ start_a_stub(size_deopt_handler());
  
++<<<<<<< HEAD
 +  if (base == NULL) {
++=======
+   if (base == nullptr) {
+     ciEnv::current()->record_failure("CodeCache is full");
++>>>>>>> d5f3d5c8cc3 (8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space)
      return 0;  // CodeBuffer::expand failed
    }
 ```

I performed the testing & didn't see any new failure appearing.

NULL to nullptr change wasn't backported. So I got merge conflict in those lines. I'm marking it as clean, if it's not right, I'll be happy to go for formal review as well. 

cc: @RealLucy :-)

-------------

PR Comment: https://git.openjdk.org/jdk22u/pull/170#issuecomment-2084509795
PR Comment: https://git.openjdk.org/jdk22u/pull/170#issuecomment-2085168970
PR Comment: https://git.openjdk.org/jdk22u/pull/170#issuecomment-2085173320


More information about the jdk-updates-dev mailing list