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

Hao Sun haosun at openjdk.java.net
Fri Jan 28 02:38:26 UTC 2022


On Thu, 27 Jan 2022 13:30:45 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> 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:
>
>> PPC64, S390, ARM32, Zero stubs were initially introduced to Loom in
>> commit [3a89cd5](https://github.com/openjdk/loom/commit/3a89cd5a85acca136cc3329a9b11253280435bb4) [1]. However, necessary updates were missing afterward,
>> leading to compilation failures.
> 
> Our focus has been x64 and aarch64 so have been ignoring other architectures and the zero build. At a glance, your update looks okay and can be integrated. @shipilev Do you have any comments on this?

Thanks for your reviews! @AlanBateman  and @shipilev 

As suggested by @shipilev , I ran the GHA manually. See https://github.com/shqking/loom/runs/4969398407?check_suite_focus=true

Unfortunately arm32 build failed due to one compilation warning.
In my previous local testing, this warning was not exposed mainly because I tested `release` build rather than `fastdebug` build.

I will fix this warning soon.

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

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


More information about the loom-dev mailing list