RFR: Loom: Add missing stubs to fix build failures on PPC64, S390, ARM32 and Zero [v2]

Hao Sun haosun at openjdk.java.net
Fri Jan 28 06:52:13 UTC 2022


> PPC64, S390, ARM32, Zero stubs were initially introduced to Loom in
> commit 3a89cd5 [1]. However, necessary updates were missing afterward,
> leading to compilation failures.
> 
> 1. frame_helpers.inline.hpp
> 
> In commit 854a81a [2], platform specific implementation was extracted
> from continuation.cpp to frame_helpers.inline.hpp, and the corresponding
> headers for only x86 and aarch64 were created then.
> 
> This same updates should be done to PPC64/S390/ARM32/Zero as well.
> Otherwise, the following compilation error would be emitted.
> 
> 
> ~/jdk_src/src/hotspot/share/runtime/frame_helpers.inline.hpp:326:1:
> fatal error: frame_helpers_ppc.inline.hpp: No such file or directory
> 
>   326 | #include CPU_HEADER_INLINE(frame_helpers)
> 
>         | ^~~~~~~~~~~~~~~~~
> 
>         compilation terminated.
> 
> 
> Fix: see the updates in continuation_XX.inline.hpp and
> frame_helpers_XX.inline.hpp.
> 
> 2. ZGC support for PPC64
> 
> ZGC support for Loom was implemented two years ago in commit 05b1b53
> [3]. Recently ZGC for PPC64 was supported in the mainline. See commit
> 337b73a [4].
> 
> However, stub `BarrierSetNMethod::arm()` is missing for PPC64 platform.
> 
> Here is the snippet of error log when cross-compiling on PPC64 in my
> local test environment.
> 
> 
> * For target
> * hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:

Hao Sun has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'fibers' into build-ppc-s390-arm32-zero
 - Loom: Add missing stubs to fix build failures on PPC64, S390, ARM32 and Zero
   
   PPC64, S390, ARM32, Zero stubs were initially introduced to Loom in
   commit 3a89cd5 [1]. However, necessary updates were missing afterward,
   leading to compilation failures.
   
   1. frame_helpers.inline.hpp
   
   In commit 854a81a [2], platform specific implementation was extracted
   from continuation.cpp to frame_helpers.inline.hpp, and the corresponding
   headers for only x86 and aarch64 were created then.
   
   This same updates should be done to PPC64/S390/ARM32/Zero as well.
   Otherwise, the following compilation error would be emitted.
   
   ```
   ~/jdk_src/src/hotspot/share/runtime/frame_helpers.inline.hpp:326:1:
   fatal error: frame_helpers_ppc.inline.hpp: No such file or directory
   
     326 | #include CPU_HEADER_INLINE(frame_helpers)
   
           | ^~~~~~~~~~~~~~~~~
   
           compilation terminated.
   ```
   
   Fix: see the updates in continuation_XX.inline.hpp and
   frame_helpers_XX.inline.hpp.
   
   2. ZGC support for PPC64
   
   ZGC support for Loom was implemented two years ago in commit 05b1b53
   [3]. Recently ZGC for PPC64 was supported in the mainline. See commit
   337b73a [4].
   
   However, stub `BarrierSetNMethod::arm()` is missing for PPC64 platform.
   
   Here is the snippet of error log when cross-compiling on PPC64 in my
   local test environment.
   
   ```
   * For target
   * hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:
   /usr/lib/gcc-cross/powerpc64le-linux-gnu/9/../../../../powerpc64le-linux-gnu/bin/ld:
   ~/build-release/hotspot/variant-server/libjvm/objs/zNMethod.o:
   in function `ZNMethod::arm(nmethod*, int)':
   ~/jdk_src/src/hotspot/share/gc/z/zNMethod.cpp:213:
   undefined reference to `BarrierSetNMethod::arm(nmethod*, int)'
   /usr/lib/gcc-cross/powerpc64le-linux-gnu/9/../../../../powerpc64le-linux-gnu/bin/ld:
   ~/jdk_src/src/hotspot/share/gc/z/zNMethod.cpp:213:
   undefined reference to `BarrierSetNMethod::arm(nmethod*, int)'
   collect2: error: ld returned 1 exit status
   ```
   
   In this patch, we add the stub. See the update in file
   barrierSetNMethod_ppc.cpp.
   
   Testing:
   
   Linux PPC64 cross-compilation
   Linux S390 cross-compilation
   Linux ARM32 cross-compilation
   Linux AArch64 Zero (Hotspot) compilation
   Linux x86_64 tier1_loom passes
   Linux AArch64 tier1_loom passes
   
   [1] https://github.com/openjdk/loom/commit/3a89cd5
   [2] https://github.com/openjdk/loom/commit/854a81a
   [3] https://github.com/openjdk/loom/commit/05b1b53
   [4] https://github.com/openjdk/loom/commit/337b73a

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

Changes:
  - all: https://git.openjdk.java.net/loom/pull/87/files
  - new: https://git.openjdk.java.net/loom/pull/87/files/a177ac7a..bc4ad8d5

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=loom&pr=87&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=loom&pr=87&range=00-01

  Stats: 9798 lines in 576 files changed: 6042 ins; 2120 del; 1636 mod
  Patch: https://git.openjdk.java.net/loom/pull/87.diff
  Fetch: git fetch https://git.openjdk.java.net/loom pull/87/head:pull/87

PR: https://git.openjdk.java.net/loom/pull/87


More information about the loom-dev mailing list