[RFR] [8u] 8236829: JDK-8232102 backport breaks s390
Andrew John Hughes
gnu.andrew at redhat.com
Sat Jan 11 02:11:08 UTC 2020
On 09/01/2020 07:16, Roman Kennke wrote:
> Hi Andrew,
>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8236829
>> Webrev: https://cr.openjdk.java.net/~andrew/shenandoah-8/8236829/webrev.01/
>>
>> The backport of JDK-8232102 to the 8u Shenandoah port - specifically the
>> use of byte_size_in_proper_unit - broke the build on s390 (31-bit). This
>> is the recurring problem that size_t and uint are not the same on this
>> platform.
>>
>> Hence we get several format warnings such as:
>>
>> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.242.b05-0.1.ea.el7.s390/openjdk/hotspot/src/share/vm/gc_implementation/shenandoah
>> /shenandoahHeapRegion.cpp: In static member function 'static void
>> ShenandoahHeapRegion::setup_sizes(size_t)':
>> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.242.b05-0.1.ea.el7.s390/openjdk/hotspot/src/share/vm/gc_implementation/shenandoah
>> /shenandoahHeapRegion.cpp:482:124: error: format '%zu' expects argument
>> of type 'size_t', but argument 6 has type 'unsigned int'
>> [-Werror=format=]
>>
>> byte_size_in_proper_unit(ShenandoahMinRegionSize),
>> proper_unit_for_byte_size(ShenandoahMinRegionSize));
>>
>> Forcing byte_size_in_proper_unit to use size_t, as we did before in
>> https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/hotspot/rev/ad280373e7cc,
>> fixes the problem and allowed s390 to build 8u242 b05 & b06.
>
> Looks good, thanks!
>
> I guess I shall forward-port this to all the way to jdk15. I've updated
> the bug accordingly.
>
> Roman
>
>
I guess, though we only see it on 8u as on 11+, Shenandoah is disabled
in the build on s390:
checking if shenandoah can be built... no, platform not supported
This format issue is also one that needs to be fixed upstream in the
codebase in general. We patch it locally on 8u and later OpenJDK
versions are just built without -Werror. It's just not easy to build
HEAD on a s390 system and thus get such changes upstream.
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the shenandoah-dev
mailing list